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

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 authorized users.


ConnectApp Instance Resource

Resource URI


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

Resource Properties

Property nameTypePIIDescription
account_sidSID<AC>
Not PII

The SID of the Account that created the ConnectApp resource.

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

authorize_redirect_urlstring<uri>
PII MTL: 30 days

The URL we redirect the user to after we authenticate the user and obtain authorization to access the Connect App.


company_namestring

The company name set for the Connect App.


deauthorize_callback_methodenum<http-method>

The HTTP method we use to call deauthorize_callback_url.

Possible values:
GETPOST

deauthorize_callback_urlstring<uri>

The URL we call using the deauthorize_callback_method to de-authorize the Connect App.


descriptionstring

The description of the Connect App.


friendly_namestring

The string that you assigned to describe the resource.


homepage_urlstring<uri>

The public URL where users can obtain more information about this Connect App.


permissionsarray[enum<string>]

The set of permissions that your ConnectApp requests.

Possible values:
get-allpost-all

sidSID<CN>

The unique string that that we created to identify the ConnectApp resource.

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

uristring

The URI of the resource, relative to https://api.twilio.com.

HTTP GET

Get the properties of a Connect App.

Example

Retrieve a Connect App

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

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function fetchConnectApp() {
_18
const connectApp = await client
_18
.connectApps("CNb989fdd207b04d16aee578018ef5fd93")
_18
.fetch();
_18
_18
console.log(connectApp.accountSid);
_18
}
_18
_18
fetchConnectApp();

Output

_13
{
_13
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13
"authorize_redirect_url": "http://example.com/redirect",
_13
"company_name": "Twilio",
_13
"deauthorize_callback_method": "GET",
_13
"deauthorize_callback_url": "http://example.com/deauth",
_13
"description": null,
_13
"friendly_name": "Connect app for deletion",
_13
"homepage_url": "http://example.com/home",
_13
"permissions": [],
_13
"sid": "CNb989fdd207b04d16aee578018ef5fd93",
_13
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps/CNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
_13
}

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:

Path parameters

Property nameTypeRequiredPIIDescription
AccountSidSID<AC>required

The SID of the Account that created the ConnectApp resources to update.

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

SidSID<CN>required

The Twilio-provided string that uniquely identifies the ConnectApp resource to update.

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

Request body parameters

Property nameTypeRequiredPIIDescription
AuthorizeRedirectUrlstring<uri>Optional

The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App.


CompanyNamestringOptional

The company name to set for the Connect App.


DeauthorizeCallbackMethodenum<http-method>Optional

The HTTP method to use when calling deauthorize_callback_url.

Possible values:
GETPOST

DeauthorizeCallbackUrlstring<uri>Optional

The URL to call using the deauthorize_callback_method to de-authorize the Connect App.


DescriptionstringOptional

A description of the Connect App.


FriendlyNamestringOptional

A descriptive string that you create to describe the resource. It can be up to 64 characters long.


HomepageUrlstring<uri>Optional

A public URL where users can obtain more information about this Connect App.


Permissionsarray[enum<string>]Optional

A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: get-all and post-all.

Possible values:
get-allpost-all

HTTP PUT

Not supported.

HTTP DELETE

Not supported.


ConnectApp List Resource

Resource URI


_10
/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

Retrieve all Connect Apps

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

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_16
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = twilio(accountSid, authToken);
_16
_16
async function listConnectApp() {
_16
const connectApps = await client.connectApps.list({ limit: 20 });
_16
_16
connectApps.forEach((c) => console.log(c.accountSid));
_16
}
_16
_16
listConnectApp();

Output

_25
{
_25
"connect_apps": [
_25
{
_25
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_25
"authorize_redirect_url": "http://example.com/redirect",
_25
"company_name": "Twilio",
_25
"deauthorize_callback_method": "GET",
_25
"deauthorize_callback_url": "http://example.com/deauth",
_25
"description": null,
_25
"friendly_name": "Connect app for deletion",
_25
"homepage_url": "http://example.com/home",
_25
"permissions": [],
_25
"sid": "CNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_25
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps/CNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
_25
}
_25
],
_25
"end": 0,
_25
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50",
_25
"next_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=2&PageSize=50",
_25
"page": 0,
_25
"page_size": 50,
_25
"previous_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=1&PageSize=50",
_25
"start": 0,
_25
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json"
_25
}

HTTP POST

Not Supported.

HTTP PUT

Not Supported.

HTTP DELETE

Not Supported.


Rate this page: