Skip to contentSkip to navigationSkip to topbar
On this page

Branded Calling (Public Beta)


(warning)

Public Beta

Branded Calling is currently available as a Public Beta product and the information contained in this document is subject to change. This means that some features are not yet implemented and others may be changed before the product is declared as Generally Available. Public Beta products are not covered by a Twilio SLA.


Overview

overview page anchor

Branded Calling can be used to display your business's name, logo and call reason on the called party's cell phone when they receive your call.

While CNAM can add a display name to your outbound calls made to landlines, Branded Calling can brand your calls on cell phones.


Supported functionalities

supported-functionalities page anchor
  • Display Name
  • Logo (Coming soon)
  • Call reason (Coming soon)

Note: Branded Calling is only supported for calls made to handsets from the following networks at this time

  • T-Mobile
  • Verizon


Display Name Requirements

display-name-requirements page anchor
  • Display Name can be a maximum of 32 characters.
  • Display Name must be related to your Business Name.
  • Display Name can only contain letters and numbers.

Who can sign up for Branded Calling?

who-can-sign-up-for-branded-calling page anchor
(warning)

Warning

If you are an ISV and wish to enable Branded Calling to your customer please talk to Sales or reach out to your account manager.

For information about whether you are a Direct customer or ISV please see our Am I a direct customer or an ISV?(link takes you to an external page) support page.


What you will need

what-you-will-need page anchor
  • The person completing the form must be an authorized representative of the brand.
  • A United States government-issued ID (e.g., driver's license).
  • A written description of your Branded Calling use-case.
  • Your Voice Integrity(link takes you to an external page) Trust Product SID.
  • Your Phone Number SIDs (max 25) that you wish to register for Branded Calling.

Click on Register a new Brand(link takes you to an external page) within the Branded Calling Trust Product page(link takes you to an external page) on Trust Hub(link takes you to an external page) and follow the steps.

A Branded Calling Trust Product Instance is associated with one Display Name and one or more Phone Numbers. New Branded Calling Trust Product needs to be configured for each new Display Name. A Phone Number can be associated with exactly one Branded Calling Trust Product.

In order to assign/unassign Phone Numbers to your Branded Calling Trust Product instance please use the Trust Hub REST API or contact Support(link takes you to an external page).

(information)

Info

Branded Calling registrations will not be shown in Console until approved. Review times may take up to 7 days to process. Once approved, all Phone Number SIDs provided during registration will be assigned to your Branded Trust Product instance within 72 hours.


Assign Phone Number to Branded Calling Trust Product

assign-phone-number-to-branded-calling-trust-product page anchor
  • You need the Branded Calling Trust Product SID. You can find that on the Branded Calling Trust Product(link takes you to an external page) in Trust Hub once your Brand is approved.

    • The Branded Calling Trust Product SID begins with the letters "BU"
  • You need the Phone Number SID(s) you assigned to your Business Profile earlier. (Note: Only those phone numbers already assigned to your Voice Integrity Trust Product are eligible)

    • The Phone Number SID begins with the letters "PN"
  • To retrieve any of these SIDs via API, see the Additional API Calls section below.

  • Note: Don't change the ChannelEndpointType

Assign Phone Numbers to your Branded Calling Trust ProductLink to code sample: Assign Phone Numbers to your Branded Calling Trust Product
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 createTrustProductChannelEndpointAssignment() {
11
const trustProductsChannelEndpointAssignment = await client.trusthub.v1
12
.trustProducts("YOUR_BRANDED_CALLING_TRUST_PRODUCT_SID")
13
.trustProductsChannelEndpointAssignment.create({
14
channelEndpointSid: "YOUR_PHONE_NUMBER_SID",
15
channelEndpointType: "phone-number",
16
});
17
18
console.log(trustProductsChannelEndpointAssignment.sid);
19
}
20
21
createTrustProductChannelEndpointAssignment();

Output

1
{
2
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"trust_product_sid": "YOUR_BRANDED_CALLING_TRUST_PRODUCT_SID",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"channel_endpoint_sid": "YOUR_PHONE_NUMBER_SID",
6
"channel_endpoint_type": "phone-number",
7
"date_created": "2019-07-31T02:34:41Z",
8
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
9
}

Unassign Phone Number from Branded Calling Trust Product

unassign-phone-number-from-branded-calling-trust-product page anchor

Retrieve a list of all Assigned Items for a Branded Calling Trust Product

retrieve-a-list-of-all-assigned-items-for-a-branded-calling-trust-product page anchor
  • You need the Branded Calling Trust Product SID. You can find that on the Branded Calling Trust Product(link takes you to an external page) in Trust Hub once your Brand is approved.

    • The Branded Calling Trust Product SID begins with the letters "BU"
  • This API call will return the SIDs for the Assigned Items. You need the SID associated with the Phone Number assignment that you wish to unassign in the next step.

    • The Assigned Item SID begins with the letters "RA"
Retrieve a list of all Assigned Items for an accountLink to code sample: Retrieve a list of all Assigned Items for an account
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 fetchTrustProductChannelEndpointAssignment() {
11
const trustProductsChannelEndpointAssignment = await client.trusthub.v1
12
.trustProducts("YOUR_BRANDED_CALLING_TRUST_PRODUCT_SID")
13
.trustProductsChannelEndpointAssignment(
14
"RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
15
)
16
.fetch();
17
18
console.log(trustProductsChannelEndpointAssignment.sid);
19
}
20
21
fetchTrustProductChannelEndpointAssignment();

Output

1
{
2
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"trust_product_sid": "YOUR_BRANDED_CALLING_TRUST_PRODUCT_SID",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"channel_endpoint_type": "phone-number",
7
"date_created": "2019-07-31T02:34:41Z",
8
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
9
}

Unassign an Assigned Item from a Branded Calling Trust Product

unassign-an-assigned-item-from-a-branded-calling-trust-product page anchor
  • You need the Branded Calling Trust Product SID. You can find that on the Branded Calling Trust Product(link takes you to an external page) in Trust Hub once your Brand is approved.

    • The Branded Calling Trust Product SID begins with the letters "BU"
  • You'll need your Assigned Item SID. This is the SID that starts with "RA" was returned by previous API call.

Unassign an Assigned Item from a Branded Calling Trust ProductLink to code sample: Unassign an Assigned Item from a Branded Calling Trust Product
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 deleteTrustProductChannelEndpointAssignment() {
11
await client.trusthub.v1
12
.trustProducts("YOUR_BRANDED_CALLING_TRUST_PRODUCT_SID")
13
.trustProductsChannelEndpointAssignment("YOUR_ASSIGNED_ITEM_SID")
14
.remove();
15
}
16
17
deleteTrustProductChannelEndpointAssignment();

Learn more about Business Profiles and other Trust Products in the Trust Hub Docs.


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 listIncomingPhoneNumber() {
11
const incomingPhoneNumbers = await client.incomingPhoneNumbers.list({
12
limit: 20,
13
});
14
15
incomingPhoneNumbers.forEach((i) => console.log(i.accountSid));
16
}
17
18
listIncomingPhoneNumber();

Output

1
{
2
"end": 0,
3
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
4
"incoming_phone_numbers": [
5
{
6
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"address_requirements": "none",
8
"address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"api_version": "2010-04-01",
10
"beta": null,
11
"capabilities": {
12
"voice": true,
13
"sms": false,
14
"mms": true,
15
"fax": false
16
},
17
"date_created": "Thu, 30 Jul 2015 23:19:04 +0000",
18
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
19
"emergency_status": "Active",
20
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
21
"emergency_address_status": "registered",
22
"friendly_name": "(808) 925-5327",
23
"identity_sid": "RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
24
"origin": "origin",
25
"phone_number": "+18089255327",
26
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
27
"sms_application_sid": "",
28
"sms_fallback_method": "POST",
29
"sms_fallback_url": "",
30
"sms_method": "POST",
31
"sms_url": "",
32
"status_callback": "",
33
"status_callback_method": "POST",
34
"trunk_sid": null,
35
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
36
"voice_application_sid": "",
37
"voice_caller_id_lookup": false,
38
"voice_fallback_method": "POST",
39
"voice_fallback_url": null,
40
"voice_method": "POST",
41
"voice_url": null,
42
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
43
"voice_receive_mode": "voice",
44
"status": "in-use",
45
"subresource_uris": {
46
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
47
}
48
}
49
],
50
"next_page_uri": null,
51
"page": 0,
52
"page_size": 50,
53
"previous_page_uri": null,
54
"start": 0,
55
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
56
}
Check Business Profile Phone Number AssignmentsLink to code sample: Check Business Profile Phone Number Assignments
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 listCustomerProfileChannelEndpointAssignment() {
11
const customerProfilesChannelEndpointAssignments = await client.trusthub.v1
12
.customerProfiles("YOUR_BUSINESS_PROFILE_SID")
13
.customerProfilesChannelEndpointAssignment.list({ limit: 20 });
14
15
customerProfilesChannelEndpointAssignments.forEach((c) => console.log(c.sid));
16
}
17
18
listCustomerProfileChannelEndpointAssignment();

Output

1
{
2
"results": [
3
{
4
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"channel_endpoint_type": "phone-number",
9
"date_created": "2019-07-31T02:34:41Z",
10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
11
}
12
],
13
"meta": {
14
"page": 0,
15
"page_size": 50,
16
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
17
"previous_page_url": null,
18
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
19
"next_page_url": null,
20
"key": "results"
21
}
22
}
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 listCustomerProfile() {
11
const customerProfiles = await client.trusthub.v1.customerProfiles.list({
12
limit: 20,
13
});
14
15
customerProfiles.forEach((c) => console.log(c.sid));
16
}
17
18
listCustomerProfile();

Output

1
{
2
"results": [
3
{
4
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"friendly_name": "friendly_name",
8
"status": "twilio-approved",
9
"email": "email",
10
"status_callback": "http://www.example.com",
11
"valid_until": "2020-07-31T01:00:00Z",
12
"date_created": "2019-07-30T22:29:24Z",
13
"date_updated": "2019-07-31T01:09:00Z",
14
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15
"links": {
16
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
17
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
18
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
19
},
20
"errors": [
21
{
22
"code": 18601
23
}
24
]
25
}
26
],
27
"meta": {
28
"page": 0,
29
"page_size": 50,
30
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
31
"previous_page_url": null,
32
"url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
33
"next_page_url": null,
34
"key": "results"
35
}
36
}
Check Business Profile Phone Number AssignmentsLink to code sample: Check Business Profile Phone Number Assignments
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 listCustomerProfileChannelEndpointAssignment() {
11
const customerProfilesChannelEndpointAssignments = await client.trusthub.v1
12
.customerProfiles("YOUR_BUSINESS_PROFILE_SID")
13
.customerProfilesChannelEndpointAssignment.list({ limit: 20 });
14
15
customerProfilesChannelEndpointAssignments.forEach((c) => console.log(c.sid));
16
}
17
18
listCustomerProfileChannelEndpointAssignment();

Output

1
{
2
"results": [
3
{
4
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"channel_endpoint_type": "phone-number",
9
"date_created": "2019-07-31T02:34:41Z",
10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
11
}
12
],
13
"meta": {
14
"page": 0,
15
"page_size": 50,
16
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
17
"previous_page_url": null,
18
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
19
"next_page_url": null,
20
"key": "results"
21
}
22
}
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 listTrustProduct() {
11
const trustProducts = await client.trusthub.v1.trustProducts.list({
12
limit: 20,
13
});
14
15
trustProducts.forEach((t) => console.log(t.sid));
16
}
17
18
listTrustProduct();

Output

1
{
2
"results": [
3
{
4
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"friendly_name": "friendly_name",
8
"status": "twilio-approved",
9
"email": "email",
10
"status_callback": "http://www.example.com",
11
"valid_until": "2020-07-31T01:00:00Z",
12
"date_created": "2019-07-30T22:29:24Z",
13
"date_updated": "2019-07-31T01:09:00Z",
14
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15
"links": {
16
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
17
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
18
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
19
},
20
"errors": null
21
}
22
],
23
"meta": {
24
"page": 0,
25
"page_size": 50,
26
"first_page_url": "https://trusthub.twilio.com/v1/TrustProducts?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
27
"previous_page_url": null,
28
"url": "https://trusthub.twilio.com/v1/TrustProducts?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
29
"next_page_url": null,
30
"key": "results"
31
}
32
}
Check Branded Calling Phone Number AssignmentsLink to code sample: Check Branded Calling Phone Number Assignments
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 listTrustProductChannelEndpointAssignment() {
11
const trustProductsChannelEndpointAssignments = await client.trusthub.v1
12
.trustProducts("YOUR_BRANDED_CALLING_TRUST_PRODUCT_SID")
13
.trustProductsChannelEndpointAssignment.list({ limit: 20 });
14
15
trustProductsChannelEndpointAssignments.forEach((t) => console.log(t.sid));
16
}
17
18
listTrustProductChannelEndpointAssignment();

Output

1
{
2
"results": [
3
{
4
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"trust_product_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"channel_endpoint_type": "phone-number",
9
"date_created": "2019-07-31T02:34:41Z",
10
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
11
}
12
],
13
"meta": {
14
"page": 0,
15
"page_size": 50,
16
"first_page_url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
17
"previous_page_url": null,
18
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
19
"next_page_url": null,
20
"key": "results"
21
}
22
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.