Skip to contentSkip to navigationSkip to topbar
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

instance page anchor

Resource URI

instance-uri page anchor
1
/2010-04-01/Accounts/{AccountSid}/ConnectApps/{ConnectAppSid}
2
Property nameTypeRequiredDescriptionChild properties
account_sidSID<AC>

Optional

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>

Optional

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

Optional

The company name set for the Connect App.


deauthorize_callback_methodenum<http-method>

Optional

The HTTP method we use to call deauthorize_callback_url.

Possible values:
GETPOST

deauthorize_callback_urlstring<uri>

Optional

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


descriptionstring

Optional

The description of the Connect App.


friendly_namestring

Optional

The string that you assigned to describe the resource.


homepage_urlstring<uri>

Optional

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


permissionsarray[enum<string>]

Optional

The set of permissions that your ConnectApp requests.

Possible values:
get-allpost-all

sidSID<CN>

Optional

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

Optional

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

Get the properties of a Connect App.

Example

instance-get-example-1 page anchor
Retrieve a Connect AppLink to code sample: Retrieve a Connect App
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchConnectApp() {
11
const connectApp = await client
12
.connectApps("CNb989fdd207b04d16aee578018ef5fd93")
13
.fetch();
14
15
console.log(connectApp.accountSid);
16
}
17
18
fetchConnectApp();

Output

1
{
2
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
3
"authorize_redirect_url": "http://example.com/redirect",
4
"company_name": "Twilio",
5
"deauthorize_callback_method": "GET",
6
"deauthorize_callback_url": "http://example.com/deauth",
7
"description": null,
8
"friendly_name": "Connect app for deletion",
9
"homepage_url": "http://example.com/home",
10
"permissions": [],
11
"sid": "CNb989fdd207b04d16aee578018ef5fd93",
12
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps/CNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
13
}

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.

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

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
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
AuthorizeRedirectUrlstring<uri>

Optional

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


CompanyNamestring

Optional

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.


Descriptionstring

Optional

A description of the Connect App.


FriendlyNamestring

Optional

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

Not supported.

Not supported.


ConnectApp List Resource

list page anchor
1
/2010-04-01/Accounts/{AccountSid}/ConnectApps
2

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

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listConnectApp() {
11
const connectApps = await client.connectApps.list({ limit: 20 });
12
13
connectApps.forEach((c) => console.log(c.accountSid));
14
}
15
16
listConnectApp();

Output

1
{
2
"connect_apps": [
3
{
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"authorize_redirect_url": "http://example.com/redirect",
6
"company_name": "Twilio",
7
"deauthorize_callback_method": "GET",
8
"deauthorize_callback_url": "http://example.com/deauth",
9
"description": null,
10
"friendly_name": "Connect app for deletion",
11
"homepage_url": "http://example.com/home",
12
"permissions": [],
13
"sid": "CNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
14
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps/CNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
15
}
16
],
17
"end": 0,
18
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50",
19
"next_page_uri": null,
20
"page": 0,
21
"page_size": 50,
22
"previous_page_uri": null,
23
"start": 0,
24
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50"
25
}

Not Supported.

Not Supported.

Not Supported.

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.