Create a new token for ICE servers

POST /2010-04-01/Accounts/{AccountSid}/Tokens.json

Credentials for ICE servers

Create a new token for ICE servers

Path parameters

application/x-www-form-urlencoded

Body

  • Ttl integer

    The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours).

Responses

  • 201

    Created

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • date_created string(date-time-rfc-2822) | null

      The RFC 2822 date and time in GMT that the resource was created

    • date_updated string(date-time-rfc-2822) | null

      The RFC 2822 date and time in GMT that the resource was last updated

    • ice_servers array[object(ice-servers)] | null

      An array representing the ephemeral credentials

      Hide ice_servers attributes Show ice_servers attributes
    • password string | null

      The temporary password used for authenticating

    • ttl string | null

      The duration in seconds the credentials are valid

    • username string | null

      The temporary username that uniquely identifies a Token

POST /2010-04-01/Accounts/{AccountSid}/Tokens.json
curl \
 -X POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Tokens.json \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'Ttl=42'
Request example
{
  "Ttl": 42
}
Response examples (201)
{
  "account_sid": "string",
  "date_created": "string",
  "date_updated": "string",
  "ice_servers": [
    {
      "credential": "string",
      "url": "string",
      "urls": "string",
      "username": "string"
    }
  ],
  "password": "string",
  "ttl": "string",
  "username": "string"
}