CredentialList Resource
The Credential Lists subresource represents the Credential List instances associated with this Trunk . If an INVITE
is received for a domain with a Credential List, Twilio will challenge the request. Your system will need to authenticate with a username and password. The username and password must be in one of the Credential Lists for the INVITE
to be accepted.
This API will only allow you to list, add, and remove the Credential Lists associated with your Trunk. To create, remove, or list the Credential Lists in your account, check out the Credential List reference docs .
CredentialList Properties Property name Type PII Description
The SID of the Account that created the CredentialList resource.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique string that we created to identify the CredentialList resource.
Pattern: ^CL[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Trunk the credential list in associated with.
Pattern: ^TK[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The string that you assigned to describe the resource.
date_created string<date-time> The date and time in GMT when the resource was created specified in RFC 2822 format.
date_updated string<date-time> The date and time in GMT when the resource was last updated specified in RFC 2822 format.
The absolute URL of the resource.
Create a CredentialList resource POST https://trunking.twilio.com/v1/Trunks/{TrunkSid}/CredentialLists
Property name Type Required PII Description
The SID of the Trunk to associate the credential list with.
Pattern: ^TK[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Property name Type Required PII Description
CredentialListSid SID<CL> required The SID of the Credential List that you want to associate with the trunk. Once associated, we will authenticate access to the trunk against this list.
Pattern: ^CL[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
_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 // 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 async function createCredentialList() {
_20 const credentialsList = await client.trunking.v1
_20 .trunks("TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20 .credentialsLists.create({
_20 credentialListSid: "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_20 console.log(credentialsList.accountSid);
_20 createCredentialList();
_10 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10 "trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10 "date_created": "2018-05-02T17:29:30Z",
_10 "date_updated": "2018-05-02T17:29:30Z",
_10 "friendly_name": "friendly_name",
_10 "sid": "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10 "url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
Read multiple CredentialList resources GET https://trunking.twilio.com/v1/Trunks/{TrunkSid}/CredentialLists
Property name Type Required PII Description
The SID of the Trunk from which to read the credential lists.
Pattern: ^TK[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Property name Type Required PII Description
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum: 1
Maximum: 1000
The page index. This value is simply for client state.
Minimum: 0
The page token. This is provided by the API.
_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 // 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 async function listCredentialList() {
_18 const credentialsLists = await client.trunking.v1
_18 .trunks("TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18 .credentialsLists.list({ limit: 20 });
_18 credentialsLists.forEach((c) => console.log(c.accountSid));
_22 "credential_lists": [
_22 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22 "trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22 "date_created": "2018-04-27T22:02:11Z",
_22 "date_updated": "2018-04-27T22:02:11Z",
_22 "friendly_name": "friendly_name",
_22 "sid": "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22 "url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_22 "first_page_url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists?PageSize=50&Page=0",
_22 "previous_page_url": null,
_22 "url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists?PageSize=50&Page=0",
_22 "next_page_url": null,
_22 "key": "credential_lists"
Delete a CredentialList resource DELETE https://trunking.twilio.com/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}
Property name Type Required PII Description
The SID of the Trunk from which to delete the credential list.
Pattern: ^TK[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique string that we created to identify the CredentialList resource to delete.
Pattern: ^CL[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
_17 // Download the helper library from https://www.twilio.com/docs/node/install
_17 const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_17 // Find your Account SID and Auth Token at twilio.com/console
_17 // and set the environment variables. See http://twil.io/secure
_17 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_17 const authToken = process.env.TWILIO_AUTH_TOKEN;
_17 const client = twilio(accountSid, authToken);
_17 async function deleteCredentialList() {
_17 await client.trunking.v1
_17 .trunks("TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_17 .credentialsLists("CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_17 deleteCredentialList();