Get Started

REST API: SIP Credential Lists

SIP Credential Lists are sets of credentials that are allowed to reach your SIP Domain. If you or anyone sends traffic with credentials not on the list, Twilio will filter that SIP traffic.

After you create a Credential List, you then need to map it to your SIP domain to make it take effect. You can apply a list to one or more SIP Domains.

Resource Properties

A CredentialList instance resource has the following properties:

Property Description
Sid A 34 character string that uniquely identifies each CredentialList.
AccountSid The unique id of the Account that sent this message.
FriendlyName A human readable descriptive text, up to 64 characters long.
DateCreated The date that this resource was created, given as GMT in RFC 2822 format.
DateUpdated The date that this resource was last updated, given as GMT in RFC 2822 format.
Uri The URI for this resource, relative to https://api.twilio.com

SIP CredentialLists List Resource

The SIP/CredentialLists resource represents lists of usernames that are allowed to authenticate to a mapped domain.

Resource URI

/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/

HTTP GET

Gets a list of Credential Lists for an account

GET /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/
Example

HTTP POST

Create a new Credential List.

POST /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/
POST Parameters

The following parameters are required in your POST to CredentialLists:

Parameter Description
FriendlyName A human readable descriptive text for a CredentialList, up to 64 characters long.

Example

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

SIP CredentialLists Instance Resource

The instance resource is represented by the properties above.

Resource URI

/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}

HTTP GET

Get a user instance resource

GET /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}
Example

HTTP POST

Change the FriendlyName of the list

Parameter Description
FriendlyName A human readable descriptive text for a CredentialList, up to 64 characters long.
POST /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}
Example

HTTP PUT

Not supported.

HTTP DELETE

Delete a CredentialList from your account. It can only be deleted if no domains are mapped to it. If you attempt to delete one that is mapped to a domain, you will receive an error.

If successful, Twilio will return an HTTP 204 response with no body.

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}
Example

SIP Credential Lists Subresources

Credentials List Subresource

The Credential List subresource is used to add, modify, view, and delete usernames in a Credential List. You may add up to 1000 usernames per list. For each username, you set a password that meets the following minimum requirements:

  • Minimum 12 characters
  • At least one mixed case
  • At least one digit

Twilio does not store the passwords you provide in the credential records as cleartext, they are MD5 hashed in accordance with the digest authentication specification.

Resource URI

/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}/Credentials

Resource Properties

An Credential instance resource is represented by the following properties:

Property Description
Sid A 34 character string that uniquely identifies this resource.
AccountSid The unique id of the Account that responsible for this resource.
UserName 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.
DateCreated The date that this resource was created, given as GMT in RFC 2822 format.
DateUpdated The date that this resource was last updated, given as GMT in RFC 2822 format.
Uri The URI for this resource, relative to https://api.twilio.com

HTTP GET

Get the list of Credentials in a CredentialList. The passwords for the Credentials are intentionally not returned so as to protect them.

GET /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}/Credentials
Example

HTTP POST

Add a Credential to the CredentialList.

When creating a Credential, you will POST both a username and password, but only receive the username back in the response. The password is intentionally not returned so as to protect it.

POST /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}/Credentials
POST Parameters

The following parameters are required in your POST to Credentials:

Parameter Description
Username 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.
Password The password that the username will use when when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg “IWasAtTwilioCon2011”)

Example

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

Credential Instance Subresource

Resource URI

/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}/Credentials/{CredentialSid}

HTTP GET

Get a specific Credential in a list. Though a password is stored for each username in your list, the password is not returned to protect your password. If you cannot remember your password, you will need to POST to this resource to update it.

GET /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}/Credentials/{CredentialSid}
Example

HTTP POST

Change the password of a Credential record.

If the change is successful, Twilio will respond with the Credential record but will not include the password in the response.

POST /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}/Credentials/{CredentialSid}
POST Parameters

The following parameters are required in your POST to the Credential instance:

Parameter Description
Username 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.
Password The password that the username will use when when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg “IWasAtTwilioCon2011”)

Example

HTTP PUT

Not supported.

HTTP DELETE

Remove a Credential from a CredentialList.

If successful, Twilio will return an HTTP 204 response with no body.

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CLSid}/Credentials/{CredentialSid}
Example