REST API: Connect Apps

The ConnectApps list resource shows all of the Connect Apps that you have created within your Twilio account. The instance resource shows information about the ConnectApp as well as the permissions the ConnectApp will request from authorizing users.

ConnectApp Instance Resource

Resource URI

/2010-04-01/Accounts/{AccountSid}/ConnectApps/{ConnectAppSid}

Resource Properties

Property Description
Sid The unique id of this Connect App.
DateCreated The date that this resource was created, given as GMT RFC 2822 format.
DateUpdated The date that this resource was last updated, given as GMT RFC 2822 format.
AccountSid The unique id of the Account that created this ConnectApp.
Permissions The set of permissions that your ConnectApp requests.
FriendlyName A human readable name for the Connect App.
Description A more detailed human readable description of the Connect App.
CompanyName The company name set for this Connect App.
HomepageUrl The public URL where users can obtain more information about this Connect App.
AuthorizeRedirectUrl The URL the user's browser will redirect to after Twilio authenticates the user and obtains authorization for this Connect App.
DeauthorizeCallbackUrl The URL to which Twilio will send a request when a user de-authorizes this Connect App.
DeauthorizeCallbackMethod The HTTP method to be used when making a request to the DeauthorizeCallbackUrl.
Uri The URI for this resource, relative to https://api.twilio.com.

HTTP GET

Get the properties of a Connect App.

Example
instance-get-example-1
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$connectApp = $client
    ->account
    ->connectApps("CNb989fdd207b04d16aee578018ef5fd93")
    ->fetch();

echo $connectApp->homepageUrl;
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$connect_app = $client->account->connect_apps->get("CNb989fdd207b04d16aee578018ef5fd93");
echo $connect_app->homepage_url;
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var connectApp = twilio.GetConnectApp("CNb989fdd207b04d16aee578018ef5fd93");
    
    Console.WriteLine(connectApp.HomepageUrl);
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.ConnectApp;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    ConnectApp connectApp = client.getAccount().getConnectApp("CNb989fdd207b04d16aee578018ef5fd93");
    System.out.println(connectApp.getHomepageUrl());
    
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.connectApps("CNb989fdd207b04d16aee578018ef5fd93").get(function(err, connectApp) {
    console.log(connectApp.homepageUrl);
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

connect_app = client.connect_apps.get("CNb989fdd207b04d16aee578018ef5fd93")
print(connect_app.homepage_url)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@connect_app = @client.account.connect_apps.get("CNb989fdd207b04d16aee578018ef5fd93")
puts @connect_app.homepage_url
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNb989fdd207b04d16aee578018ef5fd93 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNb989fdd207b04d16aee578018ef5fd93.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Show Output
  • JSON
  • XML
{
	"sid": "CNb989fdd207b04d16aee578018ef5fd93",
	"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	"friendly_name": "My awesome ConnectApp",
	"description": "An amazing TwilioConnect application that does amazing things!",
	"company_name": "My Company",
	"homepage_url": "http://www.mycompany.com",
	"authorize_redirect_url": "https://www.mycompany.com/connect_authorize",
	"deauthorize_callback_url": "https://www.mycompany.com/connect_deauthorize",
	"deauthorize_callback_method": "POST",
	"permissions": ["get-all","post-all"]
}
<ConnectApp>
	<Sid>CNb989fdd207b04d16aee578018ef5fd93</Sid>
	<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
	<FriendlyName>My awesome ConnectApp</FriendlyName>
	<Description>An amazing TwilioConnect application that does amazing things!</Description>
	<CompanyName>My Company</CompanyName>
	<HomepageUrl>http://www.mycompany.com</HomepageUrl>
	<AuthorizeRedirectUrl>https://www.mycompany.com/connect_authorize</AuthorizeRedirectUrl>
	<DeauthorizeCallbackUrl>https://www.mycompany.com/connect_deauthorize</DeauthorizeCallbackUrl>
	<DeauthorizeCallbackMethod>POST</DeauthorizeCallbackMethod>
	<Permissions>
		<Permission>get-all</Permission>
		<Permission>post-all</Permission>
	</Permissions>
</ConnectApp>

HTTP POST

Tries to update the Connect App's properties, and returns the updated resource representation if successful. The returned response is identical to that returned above when making a GET request.

Optional Parameters

You may specify one or more of the following parameters to update this Connect App's respective properties:

Parameter Description
FriendlyName A human readable description of the Connect App, with maximum length 64 characters.
AuthorizeRedirectUrl The URL the user's browser will redirect to after Twilio authenticates the user and obtains authorization for this Connect App.
DeauthorizeCallbackUrl The URL to which Twilio will send a request when a user de-authorizes this Connect App.
DeauthorizeCallbackMethod The HTTP method to be used when making a request to the DeauthorizeCallbackUrl. Either GET or POST.
Permissions A comma-separated list of permssions you will request from users of this ConnectApp. Valid permssions are get-all or post-all.
Description A more detailed human readable description of the Connect App.
CompanyName The company name for this Connect App.
HomepageUrl The public URL where users can obtain more information about this Connect App.

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

ConnectApp List Resource

Resource URI

/2010-04-01/Accounts/{AccountSid}/ConnectApps

HTTP GET

Returns a list of Connect App resource representations, each representing a Connect App in your account. The list includes paging information.

Example 1
list-get-example-1
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Loop over the list of connect_apps and echo a property for each one
foreach ($client->account->connectApps->read() as $connectAapp) {
    echo $connectAapp->friendlyName;
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of connect_apps and echo a property for each one
foreach ($client->account->connect_apps as $connect_app) {
    echo $connect_app->friendly_name;
}
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var connectApps = twilio.ListConnectApps(null, null);
    
    foreach (var connectApp in connectApps.ConnectApps)
    {
      Console.WriteLine(connectApp.FriendlyName);
    }
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.ConnectApp;
import com.twilio.sdk.resource.list.ConnectAppList;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    
    
    ConnectAppList connectApps = client.getAccount().getConnectApps();
    
    // Loop over connectApps and print out a property for each one.
    for (ConnectApp connectApp : connectApps) {
      System.out.println(connectApp.getFriendlyName());
    }
    
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.connectApps.list(function(err, data) {
    data.connectApps.forEach(function(connectApp) {
        console.log(connectApp.FriendlyName);
    });
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of connect_app objects with the properties described above
connect_apps = client.connect_apps.list()
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over connect_apps and print out a property for each one
@client.account.connect_apps.list.each do |connect_app|
    puts connect_app.friendly_name
end
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Show Output
  • JSON
  • XML
{
  "connect_apps": [
    {
      "sid": "CNb989fdd207b04d16aee578018ef5fd93",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "friendly_name": "My awesome ConnectApp",
      "description": "An amazing TwilioConnect application that does amazing things!",
      "company_name": "My Company",
      "homepage_url": "http://www.mycompany.com",
      "authorize_redirect_url": "https://www.mycompany.com/connect_authorize",
      "deauthorize_callback_url": "https://www.mycompany.com/connect_deauthorize",
      "deauthorize_callback_method": "POST",
      "permissions": ["get-all","post-all"]
    }
    ...
  ],
  "page": 0,
  "page_size": 50,
  "uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/ConnectApps\/.json",
  "first_page_uri": "\/2010-04-01\/Accounts\/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\/ConnectApps\/.json?Page=0&PageSize=50",
  "previous_page_uri": null,
  "next_page_uri": null,
}
<TwilioResponse>
	<ConnectApps page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/?Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<ConnectApp>
			<Sid>CNb989fdd207b04d16aee578018ef5fd93</Sid>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>My awesome ConnectApp</FriendlyName>
			<Description>An amazing TwilioConnect application that does amazing things!</Description>
			<CompanyName>My Company</CompanyName>
			<HomepageUrl>http://www.mycompany.com</HomepageUrl>
			<AuthorizeRedirectUrl>https://www.mycompany.com/connect_authorize</AuthorizeRedirectUrl>
			<DeauthorizeCallbackUrl>https://www.mycompany.com/connect_deauthorize</DeauthorizeCallbackUrl>
			<DeauthorizeCallbackMethod>POST</DeauthorizeCallbackMethod>
			<Permissions>
				<Permission>get-all</Permission>
				<Permission>post-all</Permission>
			</Permissions>
		</ConnectApp>
	</ConnectApps>
</TwilioResponse>

HTTP POST

Not Supported.

HTTP PUT

Not Supported.

HTTP DELETE

Not Supported.