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

SIP Credential Resource


The Credential resource stores usernames and password information.


Username and Password

username-and-password page anchor

Each Username requires a corresponding password that meets the requirements in the Password parameter's description.

We don't store the passwords you provide in the credential records as cleartext. Instead, they are MD5 hashed in accordance with the digest authentication specification.


SIP Credential properties

sip-credential-properties page anchor
Resource properties
sidtype: SID<CR>Not PII

A 34 character string that uniquely identifies this resource.


account_sidtype: SID<AC>Not PII

The unique id of the Account that is responsible for this resource.


credential_list_sidtype: SID<CL>Not PII

The unique id that identifies the credential list that includes this credential.


usernametype: stringPII MTL: 30 days

The username for this credential.


date_updatedtype: string<DATE TIME RFC 2822>Not PII

The date that this resource was last updated, given as GMT in RFC 2822(link takes you to an external page) format.


uritype: stringNot PII

The URI for this resource, relative to https://api.twilio.com


Create a SIP Credential resource

create-a-sip-credential-resource page anchor
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json

Parameters

create-parameters page anchor
URI parameters
AccountSidtype: SID<AC>Not PII
Path Parameter

The unique id of the Account that is responsible for this resource.


CredentialListSidtype: SID<CL>Not PII
Path Parameter

The unique id that identifies the credential list to include the created credential.


Request body parameters
Usernametype: stringPII MTL: 30 days
Required

The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long.


Passwordtype: stringNot PII
Required

The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg IWasAtSignal2018)

Create a SIP Credential resource

create-a-sip-credential-resource-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.sip.credentialLists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.credentials
_11
.create({username: 'username', password: 'password'})
_11
.then(credential => console.log(credential.sid));

Output

_10
{
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"credential_list_sid": "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "Wed, 19 Aug 2015 19:48:45 +0000",
_10
"date_updated": "Wed, 19 Aug 2015 19:48:45 +0000",
_10
"sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
_10
"username": "username"
_10
}


Fetch a SIP Credential resource

fetch-a-sip-credential-resource page anchor
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json

URI parameters
AccountSidtype: SID<AC>Not PII
Path Parameter

The unique id of the Account that is responsible for this resource.


CredentialListSidtype: SID<CL>Not PII
Path Parameter

The unique id that identifies the credential list that contains the desired credential.


Sidtype: SID<CR>Not PII
Path Parameter

The unique id that identifies the resource to fetch.

Fetch a SIP Credential resource

fetch-a-sip-credential-resource-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.sip.credentialLists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.credentials('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.fetch()
_11
.then(credential => console.log(credential.username));

Output

_10
{
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"credential_list_sid": "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "Wed, 19 Aug 2015 19:48:45 +0000",
_10
"date_updated": "Wed, 19 Aug 2015 19:48:45 +0000",
_10
"sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
_10
"username": "1440013725.28"
_10
}


Read multiple SIP Credential resources

read-multiple-sip-credential-resources page anchor
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json

URI parameters
AccountSidtype: SID<AC>Not PII
Path Parameter

The unique id of the Account that is responsible for this resource.


CredentialListSidtype: SID<CL>Not PII
Path Parameter

The unique id that identifies the credential list that contains the desired credentials.


PageSizetype: integerNot PII
Query Parameter

How many resources to return in each list page. The default is 50, and the maximum is 1000.


Pagetype: integerNot PII
Query Parameter

The page index. This value is simply for client state.


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

Read multiple SIP Credential resources

read-multiple-sip-credential-resources-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.sip.credentialLists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.credentials
_11
.list({limit: 20})
_11
.then(credentials => credentials.forEach(c => console.log(c.sid)));

Output

_21
{
_21
"credentials": [
_21
{
_21
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_21
"credential_list_sid": "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_21
"date_created": "Wed, 19 Aug 2015 19:48:45 +0000",
_21
"date_updated": "Wed, 19 Aug 2015 19:48:45 +0000",
_21
"sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_21
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
_21
"username": "1440013725.28"
_21
}
_21
],
_21
"end": 0,
_21
"first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials.json?PageSize=50&Page=0",
_21
"next_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials.json?PageSize=50&Page=50",
_21
"page": 0,
_21
"page_size": 50,
_21
"previous_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials.json?PageSize=50&Page=0",
_21
"start": 0,
_21
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials.json?PageSize=50&Page=0"
_21
}


Update a SIP Credential resource

update-a-sip-credential-resource page anchor
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json

The update action is used to update a user's password.

URI parameters
AccountSidtype: SID<AC>Not PII
Path Parameter

The unique id of the Account that is responsible for this resource.


CredentialListSidtype: SID<CL>Not PII
Path Parameter

The unique id that identifies the credential list that includes this credential.


Sidtype: SID<CR>Not PII
Path Parameter

The unique id that identifies the resource to update.


Request body parameters
Passwordtype: stringNot PII

The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg IWasAtSignal2018)

Update a SIP Credential resource

update-a-sip-credential-resource-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.sip.credentialLists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.credentials('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.update({password: 'password'})
_11
.then(credential => console.log(credential.username));

Output

_10
{
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"credential_list_sid": "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "Wed, 19 Aug 2015 19:48:45 +0000",
_10
"date_updated": "Wed, 19 Aug 2015 19:48:45 +0000",
_10
"sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
_10
"username": "username"
_10
}


Delete a SIP Credential resource

delete-a-sip-credential-resource page anchor
DELETE https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json

URI parameters
AccountSidtype: SID<AC>Not PII
Path Parameter

The unique id of the Account that is responsible for this resource.


CredentialListSidtype: SID<CL>Not PII
Path Parameter

The unique id that identifies the credential list that contains the desired credentials.


Sidtype: SID<CR>Not PII
Path Parameter

The unique id that identifies the resource to delete.

Delete a SIP Credential resource

delete-a-sip-credential-resource-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.sip.credentialLists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.credentials('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.remove();


Rate this page: