Rate this page:

REST API: Network Traversal Service Tokens

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.

Token List Resource

Resource URI


Resource Properties

A Token instance resource has the following properties

Property Description
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.


Not Supported


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.

Optional Parameters

You may POST the following parameters:

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

              HTTP PUT

              Not Supported.

              HTTP DELETE

              Not Supported.

              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 by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.


                    Thank you for your feedback!

                    We are always striving to improve our documentation quality, and your feedback is valuable to us. Please select the reason(s) for your feedback or provide additional information about how we can improve:

                    Sending your feedback...
                    🎉 Thank you for your feedback!
                    Something went wrong. Please try again.

                    Thanks for your feedback!

                    Refer us and get $10 in 3 simple steps!

                    Step 1

                    Get link

                    Get a free personal referral link here

                    Step 2

                    Give $10

                    Your user signs up and upgrade using link

                    Step 3

                    Get $10

                    1,250 free SMSes
                    OR 1,000 free voice mins
                    OR 12,000 chats
                    OR more