Overview
Configuration is provided for establishing connections with the Twilio service. The configuration is used in the REST Connection Manager.
Setup
Press icon to get more information about the connection parameters.
Obtain data
Use REST Source component to get data from service resource.
Insert data
Use REST Destination component to insert data into service resource.
Quick Start
In this task, we will show you step-by-step how to create a connection to Twilio Rest API using COZYROC's REST Connection Manager.
Step 2. From drop-down menu Configuration select Twilio. Then provide the value for the parameters username and password in the grid below.
Note: username will be Twilio Account Sid
and password will be Twilio Auth Token
. Both can be obtain from your Twilio instance. For details visit https://www.twilio.com/blog/better-twilio-authentication-csharp-twilio-api-keys
Congratulations! You have now established a connection to your Twilio instance.
In this guide, we will show how to read data from the Twilio service resource using the COZYROC REST Source component.
In this guide, we will show how to write data to the Twilio service resource using the COZYROC REST Destination component.
Configuration
Base URL address: https://api.twilio.com/2010-04-01
.
- Token
-
The authentication uses an authorized token.
The following request parameters will be automatically processed during the authentication process:
-
Authorization:
Basic {{=Base64.encode(token.Access)}}
Documentation: https://www.twilio.com/docs/api/rest/connect-overview.
-
Authorization:
- [Read] action
-
The result is paginated.The following request parameters will be automatically processed:
-
PageSize:
{{=parameters.batchSize}}
-
Page:
{{=parameters.iterator.Page}}
-
AfterSid:
{{=parameters.iterator.AfterSid}}
-
PageToken:
{{=parameters.iterator.PageToken}}
-
_includeUserParameters:
{{=parameters}}
-
PageSize:
- [Create] action
-
The action uses POST method.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
-
item:
{{=item}}
-
_includeUserParameters:
- [Update] action
-
The action uses PUT method.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
-
item:
{{=item}}
-
_includeUserParameters:
- [Delete] action
-
The action uses DELETE method.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts.json
.
The result is extracted from:{{=response.accounts}}
.Documentation: https://www.twilio.com/docs/api/rest/account#list-get.
- [Create] action
-
Endpoint URL address:
/Accounts
.Documentation: https://www.twilio.com/docs/api/rest/subaccounts#creating-subaccounts-post-parameters.
- [Update] action
-
Endpoint URL address:
/Accounts/{{=item.sid}}
.
- sid
A key field. Template: ShortText.
- date_created
Template: DateTime. A read-only field.
- date_updated
Template: DateTime. A read-only field.
- friendly_name
Template: ShortText.
- type
Template: ShortText. A read-only field.
- status
Template: ShortText.
- auth_token
Template: ShortText. A read-only field.
- uri
Template: ShortText. A read-only field.
- subresource_uris
A read-only field. Field components:
-
Uses template:
ShortText
. - Contains the following components: applications, authorized_connect_apps, available_phone_numbers, calls, conferences, connect_apps, incoming_phone_numbers, media, messages, notifications, outgoing_caller_ids, queues, recordings, sip, sms_messages, transcriptions, usage.
-
Uses template:
- owner_account_sid
Template: ShortText. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/Addresses.json
.
The result is extracted from:{{=response.addresses}}
.The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
Documentation: https://www.twilio.com/docs/api/rest/addresses#list-get.
- [Create] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Addresses
.Documentation: https://www.twilio.com/docs/api/rest/addresses#instance-post.
- [Update] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Addresses/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/addresses#list-post.
- [Delete] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Addresses/{{=item.sid}}
.
- sid
A key field. Template: ShortText.
- account_sid
A key field. Template: ShortText.
- friendly_name
Template: ShortText.
- customer_name
Template: ShortText.
- street
Template: ShortText.
- city
Template: ShortText.
- region
Template: ShortText.
- postal_code
Template: ShortText.
- iso_country
Template: ShortText.
- uri
Template: ShortText. A read-only field.
- emergency_enabled
Data type: DT_BOOL A read-only field.
- validated
Data type: DT_BOOL A read-only field.
- auto_correct_address
Data type: DT_BOOL
- dependent_phone_number
-
Template: PhoneNumber. An array field. The value is gathered from
/Accounts/{{=item.account_sid}}/Addresses/{{=item.sid}}/DependentPhoneNumbers
address. The gathered value is processed with{{=response.dependent_phone_numbers}}
expression.Documentation: https://www.twilio.com/docs/api/rest/addresses#list-uri-dependent-pns.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/Keys.json
.
The result is extracted from:{{=response.keys}}
.The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
Documentation: https://www.twilio.com/docs/api/rest/keys#list-get.
- [Create] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Keys
.Documentation: https://www.twilio.com/docs/api/rest/keys#list-post.
- [Delete] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Keys/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/keys#instance-delete.
- sid
A key field. Template: ShortText.
- friendly_name
Template: ShortText.
- uri
Template: ShortText. A read-only field.
- date_created
Template: DateTime. A read-only field.
- date_updated
Template: DateTime. A read-only field.
- account_sid
A key field. Template: ShortText.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/Applications.json
.
The result is extracted from:{{=response.applications}}
.The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
Documentation: https://www.twilio.com/docs/api/rest/applications#list-get.
- [Create] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Applications
.Documentation: https://www.twilio.com/docs/api/rest/applications#instance-post.
- [Delete] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Applications/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/applications#instance-delete.
- sid
A key field. Template: ShortText.
- date_created
Template: DateTime. A read-only field.
- date_updated
Template: DateTime. A read-only field.
- friendly_name
Template: ShortText.
- account_sid
A key field. Template: ShortText.
- api_version
Template: ShortText.
- voice_url
Template: ShortText.
- voice_method
Template: ShortText.
- voice_fallback_url
Template: ShortText.
- voice_fallback_method
Template: ShortText.
- status_callback
Template: ShortText.
- status_callback_method
Template: ShortText.
- voice_caller_id_lookup
Data type: DT_BOOL
- sms_url
Template: ShortText.
- sms_method
Template: ShortText.
- sms_fallback_url
Template: ShortText.
- sms_fallback_method
Template: ShortText.
- sms_status_callback
Template: ShortText.
- message_status_callback
Template: ShortText.
- uri
Template: ShortText. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/AvailablePhoneNumbers/{{=parameters.iso_country_code}}/{{=parameters.type}}.json
.
The result is extracted from:{{=response.available_phone_numbers}}
.The action has the following user-defined parameters:
- type: Optional. Specify phone number type: Local, TollFree, Mobile
- account_sid: Required. Specify account sid.
- iso_country_code: Required. Specify country code in ISO 3166-1 alpha-2 format.
The resource includes the fields from the PhoneNumber template.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/AvailablePhoneNumbers.json
.
The result is extracted from:{{=response.countries}}
.The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
- country_code
Template: ShortText.
- country
Template: ShortText.
- beta
Data type: DT_BOOL
- subresource_uris
Field components:
-
Uses template:
ShortText
. - Contains the following components: local, toll_free, mobile.
-
Uses template:
- uri
Template: ShortText.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
https://preview.twilio.com/porting/PortOrders.json
.
The result is extracted from:{{=response.orders}}
.Documentation: https://www.twilio.com/docs/api/rest/porting-phone-numbers#po-list.
- [Create] action
-
Endpoint URL address:
https://preview.twilio.com/porting/PortOrders
.Documentation: https://www.twilio.com/docs/api/rest/porting-phone-numbers#http-post_1.
- [Update] action
-
Endpoint URL address:
https://preview.twilio.com/porting/PortOrders/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/porting-phone-numbers#http-postput.
- [Delete] action
-
Endpoint URL address:
https://preview.twilio.com/porting/PortOrders/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/porting-phone-numbers#http-delete.
- sid
A key field. Template: ShortText.
- number
Template: ShortText.
- friendly_name
Template: ShortText.
- status
Template: ShortText. A read-only field.
- date_created
Template: DateTime. A read-only field.
- date_updated
Template: DateTime. A read-only field.
- loa_sid
Template: ShortText. A read-only field.
- iso_country
Template: ShortText.
- region
Template: ShortText.
- city
Template: ShortText.
- postal_code
Template: ShortText.
- street
Template: ShortText.
- company_name
Template: ShortText.
- first_name
Template: ShortText.
- last_name
Template: ShortText.
Template: ShortText.
- status_updates_email
Template: ShortText.
- activation_date
Template: DateTime.
- submitted_date
Template: DateTime. A read-only field.
- billing_phone_number
Template: ShortText.
- account_number
Template: ShortText.
- incoming_phone_number_sid
Template: ShortText. A read-only field.
- status_callback
Template: ShortText.
- cc_emails
Template: LongText. A composite field.
- reason_code
Data type: DT_I4 A read-only field.
- reason
Template: ShortText. A read-only field.
- errors
An array field. A read-only field. Field components:
-
Uses template:
DateTime
. - Contains the following components: code, date, reason.
-
Uses template:
- url
Template: ShortText. A read-only field.
- port_type
Template: ShortText. A read-only field.
- current_carrier
Template: ShortText. A read-only field.
- earliest_activation_date
Template: DateTime. A read-only field.
- pin_number
Data type: DT_I4
- ssn_last_four
Data type: DT_I4
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
https://preview.twilio.com/porting/Loas.json
.
The result is extracted from:{{=response.loas}}
.Documentation: https://www.twilio.com/docs/api/rest/porting-phone-numbers#poloa-list.
- [Update] action
-
Endpoint URL address:
https://preview.twilio.com/porting/Loas/{{=item.id}}
.Documentation: https://www.twilio.com/docs/api/rest/porting-phone-numbers#http-post.
- sid
A key field. Template: ShortText.
- status
Template: ShortText.
- first_name
Template: ShortText.
- last_name
Template: ShortText.
Template: ShortText.
- url
Template: ShortText. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/IncomingPhoneNumbers{{=parameters.get('type') ? '/' + parameters.type : ''}}.json
.
The result is extracted from:{{=response.incoming_phone_numbers}}
.The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
- type: Specify Phone number type: Local, TollFree, Mobile
Documentation: https://www.twilio.com/docs/api/rest/incoming-phone-numbers#list-get.
- [Create] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/IncomingPhoneNumbers
.Documentation: https://www.twilio.com/docs/api/rest/incoming-phone-numbers#list-post.
- [Update] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/IncomingPhoneNumbers/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/incoming-phone-numbers#instance-post.
- [Delete] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/IncomingPhoneNumbers/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/incoming-phone-numbers#instance-delete.
- sid
A key field. Template: ShortText.
- date_created
Template: DateTime. A read-only field.
- date_updated
Template: DateTime. A read-only field.
- friendly_name
Template: ShortText.
- account_sid
A key field. Template: ShortText.
- phone_number
Template: ShortText.
- api_version
Template: ShortText.
- voice_caller_id_lookup
Data type: DT_BOOL
- voice_url
Template: ShortText.
- voice_method
Template: ShortText.
- voice_fallback_url
Template: ShortText.
- voice_fallback_method
Template: ShortText.
- status_callback
Template: ShortText.
- status_callback_method
Template: ShortText.
- voice_application_sid
Template: ShortText.
- voice_receive_mode
Template: ShortText. A read-only field.
- trunk_sid
Template: ShortText.
- sms_url
Template: ShortText.
- sms_method
Template: ShortText.
- sms_fallback_url
Template: ShortText.
- sms_fallback_method
Template: ShortText.
- sms_application_sid
Template: ShortText.
- capabilities
Template: CapabilitiesT. A read-only field.
- address_requirements
Template: ShortText. A read-only field.
- beta
Data type: DT_BOOL A read-only field.
- origin
Template: ShortText. A read-only field.
- uri
Template: ShortText. A read-only field.
- area_code
Data type: DT_I4
- type
Template: ShortText.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
https://preview.twilio.com/HostedNumbers/HostedNumberOrders.json
.
The result is extracted from:{{=response.orders}}
.Documentation: https://www.twilio.com/docs/api/rest/hosted-numbers#list.
- [Create] action
-
Endpoint URL address:
https://preview.twilio.com/HostedNumbers/HostedNumberOrders
.Documentation: https://www.twilio.com/docs/api/rest/hosted-numbers#list-post.
- [Update] action
-
Endpoint URL address:
https://preview.twilio.com/HostedNumbers/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/hosted-numbers#instance-post.
- [Delete] action
-
Endpoint URL address:
https://preview.twilio.com/HostedNumbers/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/hosted-numbers#instance-delete.
- sid
A key field. Template: ShortText.
- account_sid
Template: ShortText.
- incoming_phone_number_sid
Template: ShortText. A read-only field.
- address_sid
Template: ShortText.
- signing_document_sid
Template: ShortText. A read-only field.
- phone_number
Template: ShortText.
- capabilities
Template: CapabilitiesT. A read-only field.
- friendly_name
Template: ShortText.
- unique_name
Template: ShortText.
- status
Template: ShortText.
- date_created
Template: DateTime. A read-only field.
- date_updated
Template: DateTime. A read-only field.
Template: ShortText.
- cc_emails
Template: LongText. A composite field.
- verification_code
Template: ShortText.
- sms_capability
Template: ShortText.
- type
Template: ShortText.
- sms_url
Template: ShortText.
- sms_method
Template: ShortText.
- sms_fallback_url
Template: ShortText.
- sms_fallback_method
Template: ShortText.
- status_callback_url
Template: ShortText.
- status_callback_method
Template: ShortText.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/Tokens.json
.
The result is extracted from:{{=response.tokens}}
.The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
Documentation: https://www.twilio.com/docs/api/rest/token#list.
- [Create] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Tokens
.Documentation: https://www.twilio.com/docs/api/rest/token#list-post.
- username
Template: ShortText. A read-only field.
- password
Template: ShortText. A read-only field.
- ttl
Data type: DT_I4
- account_sid
Template: ShortText. A read-only field.
- ice_servers
Template: LongText. A read-only field. A composite field.
- date_created
Template: DateTime. A read-only field.
- date_updated
Template: DateTime. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/Usage/Records.json
.
The result is extracted from:{{=response.usage_records}}
.The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
Documentation: https://www.twilio.com/docs/api/rest/usage-records#list.
- [Read subresource] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/Usage/Records/{{=parameters.subresource}}.json
.The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
- subresource: Required. Specify subresource.
Documentation: https://www.twilio.com/docs/api/rest/usage-records#list-subresources.
- category
Template: ShortText.
- description
Template: LongText.
- account_sid
Template: ShortText.
- start_date
Data type: DT_DBDATE
- end_date
Data type: DT_DBDATE
- usage
Data type: DT_R8
- usage_unit
Template: ShortText.
- count
Data type: DT_I4
- count_unit
Template: ShortText.
- price
Data type: DT_R8
- price_unit
Template: ShortText.
- uri
Template: ShortText.
- subresource_uris
Field components:
-
Uses template:
ShortText
. - Contains the following components: daily, monthly, yearly, all_time, today, yesterday, this_month, last_month.
-
Uses template:
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/Usage/Triggers.json
.
The result is extracted from:{{=response.triggers}}
.The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
- [Create] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Usage
.
- [Update] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Usage/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/usage-triggers#instance-post.
- [Delete] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/Usage/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/usage-triggers#instance-delete.
- sid
A key field. Template: ShortText.
- date_created
Template: DateTime. A read-only field.
- date_updated
Template: DateTime. A read-only field.
- account_sid
A key field. Template: ShortText.
- friendly_name
Template: ShortText.
- recurring
Template: ShortText.
- usage_category
Template: ShortText.
- trigger_by
Template: ShortText.
- trigger_value
Data type: DT_R8
- current_value
Data type: DT_R8 A read-only field.
- usage_record_uri
Template: ShortText.
- callback_url
Template: ShortText.
- callback_method
Template: ShortText.
- date_fired
Template: DateTime. A read-only field.
- uri
Template: DateTime. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/ConnectApps.json
.
The result is extracted from:{{=response.connect_apps}}
.The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
- [Update] action
-
Endpoint URL address:
/Accounts/{{=item.account_sid}}/ConnectApps/{{=item.sid}}
.Documentation: https://www.twilio.com/docs/api/rest/connect-apps#instance-post.
- sid
A key field. Template: ShortText.
- date_created
Template: DateTime. A read-only field.
- date_updated
Template: DateTime. A read-only field.
- account_sid
Template: ShortText.
- permissions
Template: ShortText.
- friendly_name
Template: ShortText.
- description
Template: LongText.
- company_name
Template: ShortText.
- homepage_url
Template: ShortText.
- authorize_redirect_url
Template: ShortText.
- deauthorize_callback_url
Template: ShortText.
- deauthorize_callback_method
Template: ShortText.
- uri
Template: ShortText. A read-only field.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/Accounts/{{=parameters.account_sid}}/AuthorizedConnectApps.json
.
The result is extracted from:.
The action has the following user-defined parameters:
- account_sid: Required. Specify account sid.
- date_created
Template: DateTime.
- date_updated
Template: DateTime.
- account_sid
Template: ShortText.
- permissions
Template: ShortText.
- connect_app_sid
Template: ShortText.
- connect_app_friendly_name
Template: ShortText.
- connect_app_description
Template: LongText.
- connect_app_company_name
Template: ShortText.
- connect_app_homepage_url
Template: ShortText.
- uri
Template: ShortText.
- ShortText
Data type: DT_WSTR ( length 255 )
- LongText
Data type: DT_WSTR ( length 1000 )
- DateTime
Data type: DT_DBTIMESTAMP
- CapabilitiesT
Field components:
- Contains the following components: voice, SMS, MMS, fax.
- PhoneNumber
Field components:
-
Uses template:
ShortText
. - Contains the following components: friendly_name, phone_number, lata, rate_center, latitude, longitude, locality, region, postal_code, iso_country, capabilities, address_requirements, beta.
-
Uses template:
What's New
- New: Support for 'Message' resource.
- New: Introduced connection.
COZYROC SSIS+ Components Suite is free for testing in your development environment.
A licensed version can be deployed on-premises, on Azure-SSIS IR and on COZYROC Cloud.