Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Credential Lists

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 these lists for the INVITE to be accepted.

Credential List instances are managed through the core Twilio REST API. Check out the Credential List reference docs for more information.

Actions


List all Credential Lists for a Trunk

Back To Top

GET /Trunks/{Trunk SID}/CredentialLists

Get a paged listing of all Credential List instances for this SIP Trunk.

curl -G https://trunking.twilio.com/v1/Trunks/{trunk sid}/CredentialLists \
    -u '{twilio account sid}:{twilio auth token}'

Example Response

{
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://trunking.twilio.com/v1/Trunks/TK298268bb645f1854e9ad171bd1427003/CredentialLists?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://trunking.twilio.com/v1/Trunks/TK298268bb645f1854e9ad171bd1427003/CredentialLists?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "credential_lists"
  },
  "credential_lists": [
    {
      "sid": "CL4ed3974519dd3600e09e4bcef81a0cde",
      "account_sid": "ACxxx",
      "trunk_sid": "TK298268bb645f1854e9ad171bd1427003",
      "friendly_name": "support",
      "date_created": "2015-05-14T21:00:12Z",
      "date_updated": "2015-05-14T21:00:12Z",
      "url": "https://trunking.twilio.com/v1/Trunks/TK298268bb645f1854e9ad171bd1427003/CredentialLists/CL4ed3974519dd3600e09e4bcef81a0cde"
    }
  ]
}


Associate a Credential List with a Trunk

Back To Top

POST /Trunks/{Trunk SID}/CredentialLists

Associate a Credential List (by SID) with this SIP Trunk.

curl -XPOST https://trunking.twilio.com/v1/Trunks/{trunk sid}/CredentialLists \
    -d "CredentialListSid=xxx" \
    -u '{twilio account sid}:{twilio auth token}'

Required Parameters

Names in PHP format
trunkSid
Required
post sid<TR> Not PII

The SID of the Trunk to associate the credential list with.

credentialListSid
Required
post sid<CL> Not PII

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.

Example Response

{
  "sid": "CL4ed3974519dd3600e09e4bcef81a0cde",
  "account_sid": "ACxxx",
  "trunk_sid": "TK309c0a8821fabd603c876051f958640c",
  "friendly_name": "support",
  "date_created": "2015-05-14T21:00:12Z",
  "date_updated": "2015-05-14T21:00:12Z",
  "url": "https://trunking.twilio.com/v1/Trunks/TK309c0a8821fabd603c876051f958640c/CredentialLists/CL4ed3974519dd3600e09e4bcef81a0cde"
}


Remove an associated Credential List from a Trunk

Back To Top

DELETE /Trunks/{Trunk SID}/CredentialLists/{Credential List SID}

Remove a credential list (identified by a SID) from this SIP Trunk.

curl -XDELETE https://trunking.twilio.com/v1/Trunks/{trunk sid}/CredentialLists/{list sid} \
    -u '{twilio account sid}:{twilio auth token}'

Example Response

A successful request returns an HTTP status code 204 and an empty body.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.