OauthV2Token

Issues a new Access token (optionally identity_token & refresh_token) in exchange of Oauth grant

Changed on
post/v2/token

Request

  • Base URL
    https://oauth.twilio.com
  • URL
    https://oauth.twilio.com/v2/token
  • Auth
    none required

Query parameters

account_sidstring

Optional Account SID to perform on behalf of requests.

Request body application/x-www-form-urlencoded

grant_typestring required

Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.

client_idstring

A 34 character string that uniquely identifies this OAuth App.

client_secretstring

The credential for confidential OAuth App.

codestring

JWT token related to the authorization code grant type.

redirect_uristring

The redirect uri

audiencestring

The targeted audience uri

refresh_tokenstring

JWT token related to refresh access token.

scopestring

The scope of token

code_verifierstring

The PKCE code verifier used to generate the code_challenge in the authorization request.

Response

Created

access_tokenstring nullable

Token which carries the necessary information to access a Twilio resource directly.

refresh_tokenstring nullable

Token which carries the information necessary to get a new access token.

id_tokenstring nullable

Token which carries the information necessary of user profile.

token_typestring nullable

Token type

expires_ininteger nullable

Changes