Network Traversal Service Tokens are ephemeral credentials that let you access TURN resources from WebRTC and VoIP clients. They are a secure way to create communication sessions with web browsers or mobile apps without exposing credentials in a client-side environment. All tokens have a limited lifetime to protect you from abuse. The lifetime is configurable up to 24 hours (which is also the default value) but you should make it as short as possible for your application.
A Token instance resource has the following properties
|Username||The temporary username that uniquely identifies a Token.|
|Password||The temporary password that the username will use when authenticating with Twilio.|
|Ttl||The duration in seconds for which the username and password are valid, the default value is 86,400 (24 hours)|
|AccountSid||The unique id of the Account that created this Token.|
|IceServers||An array representing the ephemeral credentials and the STUN and TURN server URIs.|
|DateCreated||The date that this resource was created, given in RFC 2822 format.|
|DateUpdated||The date that this resource was last updated, given in RFC 2822 format.|
You can create a new Token resource by POSTing to the Tokens list resource. Since the purpose of tokens is to provide short-lived credentials, usernames and passwords are always auto-generated and not intended to be stored long term.
You may POST the following parameters:
|Ttl||The duration in seconds for which the generated credentials are valid, the default value is 86400 (24 hours).|