SIP CredentialListMapping Resource
On this reference page, you'll learn about the properties, parameters, and methods available for the SIP CredentialListMapping resource. See Related how-to documentation to learn the steps to use the info on this page.
The CredentialListMapping resource represents the CredentialList resources associated with a SIP Domain. A CredentialList resource contains the Credential resources of the users who can access the SIP Domain.
If an INVITE is received for a domain with a credential list mapped to it, we challenge the request and your system must authenticate it with a username and password. To be accepted, the username and password must be in one of the credential lists mapped to the SIP Domain.
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json
The SID of the Account that will create the resource.
^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34The SID of the SIP domain that will contain the new resource.
^SD[0-9a-fA-F]{32}$Min length: 34Max length: 34application/x-www-form-urlencodedThe SID of the CredentialList resource to map to the SIP domain.
^CL[0-9a-fA-F]{32}$Min length: 34Max length: 341// 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 at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function createSipAuthCallsCredentialListMapping() {14const credentialListMapping = await client.sip15.domains("SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")16.auth.calls.credentialListMappings.create({17credentialListSid: "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",18});1920console.log(credentialListMapping.accountSid);21}2223createSipAuthCallsCredentialListMapping();
Response
1{2"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",3"date_created": "Thu, 30 Jul 2015 20:00:00 +0000",4"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",5"friendly_name": "friendly_name",6"sid": "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"7}
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json
The SID of the Account that created the CredentialListMapping resource to fetch.
^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34The SID of the SIP domain that contains the resource to fetch.
^SD[0-9a-fA-F]{32}$Min length: 34Max length: 34The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch.
^CL[0-9a-fA-F]{32}$Min length: 34Max length: 341// 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 at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function fetchSipAuthCallsCredentialListMapping() {14const credentialListMapping = await client.sip15.domains("SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")16.auth.calls.credentialListMappings("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")17.fetch();1819console.log(credentialListMapping.accountSid);20}2122fetchSipAuthCallsCredentialListMapping();
Response
1{2"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",3"date_created": "Thu, 30 Jul 2015 20:00:00 +0000",4"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",5"friendly_name": "friendly_name",6"sid": "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"7}
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json
The SID of the Account that created the CredentialListMapping resources to read.
^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34The SID of the SIP domain that contains the resources to read.
^SD[0-9a-fA-F]{32}$Min length: 34Max length: 34How many resources to return in each list page. The default is 50, and the maximum is 1000.
1Maximum: 1000The 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 at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function listSipAuthCallsCredentialListMapping() {14const credentialListMappings = await client.sip15.domains("SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")16.auth.calls.credentialListMappings.list({ limit: 20 });1718credentialListMappings.forEach((c) => console.log(c.end));19}2021listSipAuthCallsCredentialListMapping();
Response
1{2"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Calls/CredentialListMappings.json?PageSize=50&Page=0",3"end": 0,4"previous_page_uri": null,5"contents": [],6"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Calls/CredentialListMappings.json?PageSize=50&Page=0",7"page_size": 50,8"start": 0,9"next_page_uri": null,10"page": 011}
DELETE https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json
The SID of the Account that created the CredentialListMapping resources to delete.
^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34The SID of the SIP domain that contains the resource to delete.
^SD[0-9a-fA-F]{32}$Min length: 34Max length: 34The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete.
^CL[0-9a-fA-F]{32}$Min length: 34Max length: 341// 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 at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function deleteSipAuthCallsCredentialListMapping() {14await client.sip15.domains("SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")16.auth.calls.credentialListMappings("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")17.remove();18}1920deleteSipAuthCallsCredentialListMapping();