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.
The SID of the Account that created the CredentialList resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique string that we created to identify the CredentialList resource.
^CL[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Trunk the credential list in associated with.
^TK[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The date and time in GMT when the resource was created specified in RFC 2822 format.
The date and time in GMT when the resource was last updated specified in RFC 2822 format.
The absolute URL of the resource.
POST https://trunking.twilio.com/v1/Trunks/{TrunkSid}/CredentialLists
The SID of the Trunk to associate the credential list with.
^TK[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
application/x-www-form-urlencoded
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.
^CL[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createCredentialList() {11const credentialsList = await client.trunking.v112.trunks("TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.credentialsLists.create({14credentialListSid: "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",15});1617console.log(credentialsList.accountSid);18}1920createCredentialList();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"date_created": "2018-05-02T17:29:30Z",5"date_updated": "2018-05-02T17:29:30Z",6"friendly_name": "friendly_name",7"sid": "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"9}
GET https://trunking.twilio.com/v1/Trunks/{TrunkSid}/CredentialLists
The SID of the Trunk from which to read the credential lists.
^TK[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listCredentialList() {11const credentialsLists = await client.trunking.v112.trunks("TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.credentialsLists.list({ limit: 20 });1415credentialsLists.forEach((c) => console.log(c.accountSid));16}1718listCredentialList();
1{2"credential_lists": [3{4"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"date_created": "2018-04-27T22:02:11Z",7"date_updated": "2018-04-27T22:02:11Z",8"friendly_name": "friendly_name",9"sid": "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",10"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"11}12],13"meta": {14"page": 0,15"page_size": 50,16"first_page_url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists?PageSize=50&Page=0",17"previous_page_url": null,18"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists?PageSize=50&Page=0",19"next_page_url": null,20"key": "credential_lists"21}22}
DELETE https://trunking.twilio.com/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}
The SID of the Trunk from which to delete the credential list.
^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.
^CL[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function deleteCredentialList() {11await client.trunking.v112.trunks("TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.credentialsLists("CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")14.remove();15}1617deleteCredentialList();