Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Plugin Version Resource


A Plugin Version contains all the information about a particular version of a Plugin. Some notable fields include the URL to the plugin package, the version number and what plugin is it the version of.

Providing a URL to the built package in the plugin version provides you the flexibility of hosting your package in the software of your choice.


PluginVersion Properties

pluginversion-properties page anchor
Property nameTypePIIDescription
sidSID<FV>
Not PII

The unique string that we created to identify the Flex Plugin Version resource.

Pattern: ^FV[0-9a-fA-F]{32}$Min length: 34Max length: 34

plugin_sidSID<FP>

The SID of the Flex Plugin resource this Flex Plugin Version belongs to.

Pattern: ^FP[0-9a-fA-F]{32}$Min length: 34Max length: 34

account_sidSID<AC>

The SID of the Account that created the Flex Plugin Version resource and owns this resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

versionstring

The unique version of this Flex Plugin Version.


plugin_urlstring<uri>
PII MTL: 30 days

The URL of where the Flex Plugin Version JavaScript bundle is hosted on.


changelogstring

A changelog that describes the changes this Flex Plugin Version brings.


privateboolean

Whether the Flex Plugin Version is validated. The default value is false.


archivedboolean

Whether the Flex Plugin Version is archived. The default value is false.


validatedboolean

urlstring<uri>

The absolute URL of the Flex Plugin Version resource.


Create a PluginVersion resource

create-a-pluginversion-resource page anchor
POST https://flex-api.twilio.com/v1/PluginService/Plugins/{PluginSid}/Versions

Headers

headers page anchor
Property nameTypeRequiredPIIDescription
Flex-MetadatastringOptional

The Flex-Metadata HTTP request header

Property nameTypeRequiredPIIDescription
PluginSidstringrequired

The SID of the Flex Plugin the resource to belongs to.

Property nameTypeRequiredPIIDescription
Versionstringrequired

The Flex Plugin Version's version.


PluginUrlstring<uri>required

The URL of the Flex Plugin Version bundle


ChangelogstringOptional

The changelog of the Flex Plugin Version.


PrivatebooleanOptional

Whether this Flex Plugin Version requires authorization.


CliVersionstringOptional

The version of Flex Plugins CLI used to create this plugin


ValidateStatusstringOptional

The validation status of the plugin, indicating whether it has been validated

Create a PluginVersion

create-a-pluginversion page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.flexApi.v1.plugins('FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.pluginVersions
_14
.create({
_14
version: 'version',
_14
pluginUrl: 'https://example.com'
_14
})
_14
.then(plugin_versions => console.log(plugin_versions.sid));

Output

_13
{
_13
"sid": "FVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13
"plugin_sid": "FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13
"version": "1.0.0",
_13
"plugin_url": "https://sample.twil.io/plugin.js",
_13
"changelog": "the changelog",
_13
"private": true,
_13
"archived": false,
_13
"validated": false,
_13
"date_created": "2020-01-10T20:00:00Z",
_13
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions/FVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_13
}


Fetch a PluginVersion resource

fetch-a-pluginversion-resource page anchor
GET https://flex-api.twilio.com/v1/PluginService/Plugins/{PluginSid}/Versions/{Sid}

Property nameTypeRequiredPIIDescription
Flex-MetadatastringOptional

The Flex-Metadata HTTP request header

Property nameTypeRequiredPIIDescription
PluginSidstringrequired

The SID of the Flex Plugin the resource to belongs to.


Sidstringrequired

The SID of the Flex Plugin Version resource to fetch.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.flexApi.v1.plugins('FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.pluginVersions('FVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.fetch()
_11
.then(plugin_versions => console.log(plugin_versions.sid));

Output

_13
{
_13
"sid": "FVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13
"plugin_sid": "FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13
"version": "1.0.0",
_13
"plugin_url": "https://sample.twil.io/plugin.js",
_13
"changelog": "the changelog",
_13
"private": false,
_13
"archived": false,
_13
"validated": false,
_13
"date_created": "2020-01-10T20:00:00Z",
_13
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions/FVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_13
}


Read multiple PluginVersion resources

read-multiple-pluginversion-resources page anchor
GET https://flex-api.twilio.com/v1/PluginService/Plugins/{PluginSid}/Versions

Property nameTypeRequiredPIIDescription
Flex-MetadatastringOptional

The Flex-Metadata HTTP request header

Property nameTypeRequiredPIIDescription
PluginSidstringrequired

The SID of the Flex Plugin the resource to belongs to.

Property nameTypeRequiredPIIDescription
PageSizeintegerOptional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

PageintegerOptional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

List multiple PluginVersions

list-multiple-pluginversions page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.flexApi.v1.plugins('FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.pluginVersions
_11
.list({limit: 20})
_11
.then(pluginVersions => pluginVersions.forEach(p => console.log(p.sid)));

Output

_26
{
_26
"plugin_versions": [
_26
{
_26
"sid": "FVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26
"plugin_sid": "FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26
"version": "1.0.0",
_26
"plugin_url": "https://sample.twil.io/plugin.js",
_26
"changelog": "the changelog",
_26
"private": false,
_26
"archived": false,
_26
"validated": false,
_26
"date_created": "2020-01-10T20:00:00Z",
_26
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions/FVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_26
}
_26
],
_26
"meta": {
_26
"page": 0,
_26
"page_size": 50,
_26
"first_page_url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions?PageSize=50&Page=0",
_26
"previous_page_url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions?PageSize=50&Page=0",
_26
"url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions?PageSize=50&Page=0",
_26
"next_page_url": "https://flex-api.twilio.com/v1/PluginService/Plugins/FPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Versions?PageSize=50&Page=1",
_26
"key": "plugin_versions"
_26
}
_26
}


Rate this page: