SIP Domain Registration CredentialListMapping Resource
The SIP Domain Registration CredentialListMappings subresource represents the CredentialList instances associated with this domain's registration.
If a domain registration is received for a domain with a Credential List mapped to it, 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 mapped lists for the registration to be accepted
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/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 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 createSipAuthRegistrationsCredentialListMapping() {11const credentialListMapping = await client.sip12.domains("SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.auth.registrations.credentialListMappings.create({14credentialListSid: "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",15});1617console.log(credentialListMapping.accountSid);18}1920createSipAuthRegistrationsCredentialListMapping();
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/Registrations/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 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 fetchSipAuthRegistrationsCredentialListMapping() {11const credentialListMapping = await client.sip12.domains("SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.auth.registrations.credentialListMappings(14"CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"15)16.fetch();1718console.log(credentialListMapping.accountSid);19}2021fetchSipAuthRegistrationsCredentialListMapping();
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/Registrations/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 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 listSipAuthRegistrationsCredentialListMapping() {11const credentialListMappings = await client.sip12.domains("SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.auth.registrations.credentialListMappings.list({ limit: 20 });1415credentialListMappings.forEach((c) => console.log(c.end));16}1718listSipAuthRegistrationsCredentialListMapping();
Response
1{2"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Auth/Registrations/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/Registrations/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/Registrations/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 resources 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 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 deleteSipAuthRegistrationsCredentialListMapping() {11await client.sip12.domains("SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.auth.registrations.credentialListMappings(14"CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"15)16.remove();17}1819deleteSipAuthRegistrationsCredentialListMapping();