Skip to content

Exchange code for token
deprecated

Request

Retrieve ID and access tokens. This API is used to retrieve ID and access tokens using the code that was returned in the redirect URI as a query parameter (for example, when the user clicks a magic link). It may also create a new user if create_new_user was set to true in the send request and no user exists for the email address or phone number (depending on the flow).

Bodyapplication/jsonrequired
codestringrequired

Authorization code returned in the redirect URI as a query parameter upon successful authentication

Example:"GZxLFKTDCnlANVTxNvaWz7AIGPpXqZYSXdAwjiWRuOH"
client_idstring, <= 50 charactersrequired

Client ID of the application requesting the token

Example:"DgsdfhSDsdfhtSDFXCCXBVMKPws345yscv2345XCZV"
client_secretstring, <= 50 charactersrequired

Client Secret of the application requesting the token

Example:"FzxvdDMbvxnc45sdfb789XCVGEW6usazxcvbw3KPsb23"
curl -i -X POST \
  https://api.sbx.transmitsecurity.io/cis/v1/token \
  -H 'Content-Type: application/json' \
  -d '{
    "code": "GZxLFKTDCnlANVTxNvaWz7AIGPpXqZYSXdAwjiWRuOH",
    "client_id": "DgsdfhSDsdfhtSDFXCCXBVMKPws345yscv2345XCZV",
    "client_secret": "FzxvdDMbvxnc45sdfb789XCVGEW6usazxcvbw3KPsb23"
  }'

Responses

Bodyapplication/json
id_tokenstringrequired
access_tokenstringrequired
refresh_tokenstringrequired
is_user_createdbooleanrequired

Indicates if this is a new user or not

Response
{ "id_token": "string", "access_token": "string", "refresh_token": "string", "is_user_created": true }