- Phrase Language AI
- Phrase Strings
- Phrase TMS
Exchanging API tokens for JWT
Exchange the generated API Token for Access Token using Phrase Platform OAuth Token endpoint withurn:ietf:params:oauth:grant-type:token-exchange
grant type.
This is extension of OAuth basic grants which is specified in OAuth 2.0 Token Exchange (RFC-8693). Supported parameters are:
Parameter name | Value | Required |
---|---|---|
grant_type | urn:ietf:params:oauth:grant-type:token-exchange | yes |
subject_token | API-TOKEN | yes |
subject_token_type | urn:phrase:params:oauth:token-type:api_token | no |
requested_token_type | urn:ietf:params:oauth:token-type:access_token | no |
Sample request
access_token
- the generated JWT access tokenissued_token_type
- the type of returned token, alwaysurn:ietf:params:oauth:token-type:access_token
token_type
- how to use the token, alwaysBearer
expires_in
- validity of the token in seconds