POST
/2010-04-01/Accounts/{AccountSid}/Tokens.jsonCreate an ICE server token
Creates a token containing temporary credentials and ICE server details for an account. Set Ttl to control how long the generated credentials remain valid; it defaults to 86400 seconds when omitted.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
AccountSidstringrequired
The account SID, in the 34-character format `AC` followed by 32 hexadecimal characters.
Optional form-encoded settings for the ICE server token.
Ttlintegeroptional
The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours).
201Returns the created token details, including the account SID, ICE server credentials and URIs, temporary username and password, validity period, and timestamps.
account_sidstringoptional
The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Token resource.
date_createdstringoptional
The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
date_updatedstringoptional
The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
ice_serversarray<object>optional
An array representing the ephemeral credentials and the STUN and TURN server URIs.
passwordstringoptional
The temporary password that the username will use when authenticating with Twilio.
ttlstringoptional
The duration in seconds for which the username and password are valid.
usernamestringoptional
The temporary username that uniquely identifies a Token.
Error handling
The AccountSid path parameter must match the 34-character AC SID format. Ttl sets the credential lifetime in seconds and defaults to 86400 when omitted.