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

SHAKEN/STIR Onboarding with the Trust Hub REST API (Direct Customers, no Subaccounts)


(information)

Info

For general information on the Trust Hub API, go to the Trust Hub API Docs.

This page walks Direct Customers with no subaccounts through creating a SHAKEN/STIR Trust Product with the Trust Hub REST API.

Not a Direct Customer with no subaccounts? Find the appropriate onboarding instructions below:


Direct Customers (No Subaccounts)

Create a Primary Business Profile under your Parent Account. Add Phone Numbers from Subaccounts to the Business Profile.

1. Create a Primary Business Profile in your Parent Account in the Console's Trust Hub and submit for vetting

2. Add Phone Number(s) to your Primary Business Profile

  • This is required before you can add a phone number to your SHAKEN/STIR Trust Product.
  • You'll need your Business Profile's SID,

    • To find your Business Profile SID in the Console, navigate to * Trust Hub -> Customer Profiles /} View Profile Details**.
    • If you'd prefer to look up your Business Profile SID via API, see the Additional API Calls section.
    • Business Profile SIDs begin with " BU ".
  • You'll also need your Phone Number SID(s)

    • To find your Phone Number SIDs in the Console, go to your Dashboard . In the Project Info section, click on See all phone numbers , then click on a phone number to find the SID.
    • To find your Phone Number SIDs via API, see the Additional API Calls Section .
    • Phone Number SIDs begin with " PN ".
    • In the API Call below, don't change the ChannelEndpointType . It needs to be phone-number to add a phone number to your Business Profile.

Add Phone Number to Primary Business Profile

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

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function createCustomerProfileChannelEndpointAssignment() {
_21
const customerProfilesChannelEndpointAssignment = await client.trusthub.v1
_21
.customerProfiles("YOUR_BUSINESS_PROFILE_SID")
_21
.customerProfilesChannelEndpointAssignment.create({
_21
channelEndpointSid: "YOUR_PHONE_NUMBER_SID",
_21
channelEndpointType: "phone-number",
_21
});
_21
_21
console.log(customerProfilesChannelEndpointAssignment.sid);
_21
}
_21
_21
createCustomerProfileChannelEndpointAssignment();

Output

_10
{
_10
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"customer_profile_sid": "YOUR_BUSINESS_PROFILE_SID",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"channel_endpoint_sid": "YOUR_PHONE_NUMBER_SID",
_10
"channel_endpoint_type": "phone-number",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}

3. Create a SHAKEN/STIR Trust Product

  • Note: Do not change the policy_sid from the example below.
  • The response will contain the SID for your Trust Product. You'll need this for the next step.

Create SHAKEN/STIR Trust Product

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

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
async function createTrustProduct() {
_20
const trustProduct = await client.trusthub.v1.trustProducts.create({
_20
email: "EMAIL@EMAIL.COM",
_20
friendlyName: "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT",
_20
policySid: "RN7a97559effdf62d00f4298208492a5ea",
_20
});
_20
_20
console.log(trustProduct.sid);
_20
}
_20
_20
createTrustProduct();

Output

_19
{
_19
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"policy_sid": "RN7a97559effdf62d00f4298208492a5ea",
_19
"friendly_name": "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT",
_19
"status": "draft",
_19
"email": "EMAIL@EMAIL.COM",
_19
"status_callback": "http://www.example.com",
_19
"valid_until": null,
_19
"date_created": "2019-07-30T22:29:24Z",
_19
"date_updated": "2019-07-31T01:09:00Z",
_19
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"links": {
_19
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_19
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_19
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_19
},
_19
"errors": null
_19
}

4. Connect your SHAKEN/STIR Trust Product to your Business Profile

  • You'll need your Trust Product's SID . This was returned by the previous API call.
  • You'll need your Business Profile's SID . This is the SID that starts with "BU" you used earlier.
  • To retrieve these SIDs via the API, see the Additional API Calls section below. You can also find them in the Console under Trust Hub.

Connect your SHAKEN/STIR Trust Product to your Business Profile

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

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
async function createTrustProductEntityAssignment() {
_20
const trustProductsEntityAssignment = await client.trusthub.v1
_20
.trustProducts("YOUR_TRUST_PRODUCT_SID")
_20
.trustProductsEntityAssignments.create({
_20
objectSid: "YOUR_BUSINESS_PROFILE_SID",
_20
});
_20
_20
console.log(trustProductsEntityAssignment.sid);
_20
}
_20
_20
createTrustProductEntityAssignment();

Output

_10
{
_10
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"trust_product_sid": "YOUR_TRUST_PRODUCT_SID",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"object_sid": "YOUR_BUSINESS_PROFILE_SID",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}

5. Assign phone numbers to your SHAKEN/STIR Trust Product

  • You'll need the Phone Number SID(s) you assigned to your Business Profile earlier. ( Note: Only those phone numbers already assigned to your Primary Business Profile are eligible)
  • You'll need your Trust Product SID used earlier.
  • Don't change the ChannelEndpointType
  • You can complete this step before or after submitting your SHAKEN/STIR Trust Product for vetting
  • To check your Business Profile's phone numbers via API, see the Additional API Calls section below.

Assign Phone Numbers to SHAKEN/STIR Trust Product

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

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function createTrustProductChannelEndpointAssignment() {
_21
const trustProductsChannelEndpointAssignment = await client.trusthub.v1
_21
.trustProducts("YOUR_TRUST_PRODUCT_SID")
_21
.trustProductsChannelEndpointAssignment.create({
_21
channelEndpointSid: "YOUR_PHONE_NUMBER_SID",
_21
channelEndpointType: "phone-number",
_21
});
_21
_21
console.log(trustProductsChannelEndpointAssignment.sid);
_21
}
_21
_21
createTrustProductChannelEndpointAssignment();

Output

_10
{
_10
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"trust_product_sid": "YOUR_TRUST_PRODUCT_SID",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"channel_endpoint_sid": "YOUR_PHONE_NUMBER_SID",
_10
"channel_endpoint_type": "phone-number",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}

6. Submit your SHAKEN/STIR Trust Product for vetting

  • Once it reaches Twilio-Approved status, you will be able to sign outbound calls with "A" level attestation.

Submit SHAKEN/STIR Trust Product for Vetting

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 updateTrustProduct() {
_18
const trustProduct = await client.trusthub.v1
_18
.trustProducts("YOUR_TRUST_PRODUCT_SID")
_18
.update({ status: "pending-review" });
_18
_18
console.log(trustProduct.sid);
_18
}
_18
_18
updateTrustProduct();

Output

_19
{
_19
"sid": "YOUR_TRUST_PRODUCT_SID",
_19
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"friendly_name": "friendly_name",
_19
"status": "pending-review",
_19
"email": "email",
_19
"status_callback": "http://www.example.com",
_19
"valid_until": null,
_19
"date_created": "2019-07-30T22:29:24Z",
_19
"date_updated": "2019-07-31T01:09:00Z",
_19
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"links": {
_19
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_19
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_19
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_19
},
_19
"errors": null
_19
}


Additional API Calls

Get Business Profile SID

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 listCustomerProfile() {
_18
const customerProfiles = await client.trusthub.v1.customerProfiles.list({
_18
limit: 20,
_18
});
_18
_18
customerProfiles.forEach((c) => console.log(c.sid));
_18
}
_18
_18
listCustomerProfile();

Output

_36
{
_36
"results": [
_36
{
_36
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_36
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_36
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_36
"friendly_name": "friendly_name",
_36
"status": "twilio-approved",
_36
"email": "email",
_36
"status_callback": "http://www.example.com",
_36
"valid_until": "2020-07-31T01:00:00Z",
_36
"date_created": "2019-07-30T22:29:24Z",
_36
"date_updated": "2019-07-31T01:09:00Z",
_36
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_36
"links": {
_36
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_36
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_36
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_36
},
_36
"errors": [
_36
{
_36
"code": 18601
_36
}
_36
]
_36
}
_36
],
_36
"meta": {
_36
"page": 0,
_36
"page_size": 50,
_36
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
_36
"previous_page_url": null,
_36
"url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
_36
"next_page_url": null,
_36
"key": "results"
_36
}
_36
}

Get Phone Number SIDs from Parent Account

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 listIncomingPhoneNumber() {
_18
const incomingPhoneNumbers = await client.incomingPhoneNumbers.list({
_18
limit: 20,
_18
});
_18
_18
incomingPhoneNumbers.forEach((i) => console.log(i.accountSid));
_18
}
_18
_18
listIncomingPhoneNumber();

Output

_56
{
_56
"end": 0,
_56
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
_56
"incoming_phone_numbers": [
_56
{
_56
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_56
"address_requirements": "none",
_56
"address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_56
"api_version": "2010-04-01",
_56
"beta": null,
_56
"capabilities": {
_56
"voice": true,
_56
"sms": false,
_56
"mms": true,
_56
"fax": false
_56
},
_56
"date_created": "Thu, 30 Jul 2015 23:19:04 +0000",
_56
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
_56
"emergency_status": "Active",
_56
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_56
"emergency_address_status": "registered",
_56
"friendly_name": "(808) 925-5327",
_56
"identity_sid": "RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_56
"origin": "origin",
_56
"phone_number": "+18089255327",
_56
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_56
"sms_application_sid": "",
_56
"sms_fallback_method": "POST",
_56
"sms_fallback_url": "",
_56
"sms_method": "POST",
_56
"sms_url": "",
_56
"status_callback": "",
_56
"status_callback_method": "POST",
_56
"trunk_sid": null,
_56
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
_56
"voice_application_sid": "",
_56
"voice_caller_id_lookup": false,
_56
"voice_fallback_method": "POST",
_56
"voice_fallback_url": null,
_56
"voice_method": "POST",
_56
"voice_url": null,
_56
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_56
"voice_receive_mode": "voice",
_56
"status": "in-use",
_56
"subresource_uris": {
_56
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
_56
}
_56
}
_56
],
_56
"next_page_uri": null,
_56
"page": 0,
_56
"page_size": 50,
_56
"previous_page_uri": null,
_56
"start": 0,
_56
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
_56
}

Get Trust Product SIDs

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 listTrustProduct() {
_18
const trustProducts = await client.trusthub.v1.trustProducts.list({
_18
limit: 20,
_18
});
_18
_18
trustProducts.forEach((t) => console.log(t.sid));
_18
}
_18
_18
listTrustProduct();

Output

_32
{
_32
"results": [
_32
{
_32
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"friendly_name": "friendly_name",
_32
"status": "twilio-approved",
_32
"email": "email",
_32
"status_callback": "http://www.example.com",
_32
"valid_until": "2020-07-31T01:00:00Z",
_32
"date_created": "2019-07-30T22:29:24Z",
_32
"date_updated": "2019-07-31T01:09:00Z",
_32
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"links": {
_32
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_32
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_32
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_32
},
_32
"errors": null
_32
}
_32
],
_32
"meta": {
_32
"page": 0,
_32
"page_size": 50,
_32
"first_page_url": "https://trusthub.twilio.com/v1/TrustProducts?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
_32
"previous_page_url": null,
_32
"url": "https://trusthub.twilio.com/v1/TrustProducts?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
_32
"next_page_url": null,
_32
"key": "results"
_32
}
_32
}

Check Business Profile Phone Number Assignments

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 listCustomerProfileChannelEndpointAssignment() {
_18
const customerProfilesChannelEndpointAssignments = await client.trusthub.v1
_18
.customerProfiles("YOUR_BUSINESS_PROFILE_SID")
_18
.customerProfilesChannelEndpointAssignment.list({ limit: 20 });
_18
_18
customerProfilesChannelEndpointAssignments.forEach((c) => console.log(c.sid));
_18
}
_18
_18
listCustomerProfileChannelEndpointAssignment();

Output

_22
{
_22
"results": [
_22
{
_22
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"channel_endpoint_type": "phone-number",
_22
"date_created": "2019-07-31T02:34:41Z",
_22
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_22
}
_22
],
_22
"meta": {
_22
"page": 0,
_22
"page_size": 50,
_22
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
_22
"previous_page_url": null,
_22
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
_22
"next_page_url": null,
_22
"key": "results"
_22
}
_22
}


Rate this page: