Skip to main content
Users can generate new API Tokens in the User Profile/Access Tokens tab in Phrase Platform Settings page. Supported applications are:
  • Phrase Language AI
  • Phrase Strings
  • Phrase TMS
Phrase Connectors API uses a bit different authentication flow described in the respective API. For all other applications the flow is as follows:

Exchanging API tokens for JWT

Exchange the generated API Token for Access Token using Phrase Platform OAuth Token endpoint with urn: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 nameValueRequired
grant_typeurn:ietf:params:oauth:grant-type:token-exchangeyes
subject_tokenAPI-TOKENyes
subject_token_typeurn:phrase:params:oauth:token-type:api_tokenno
requested_token_typeurn:ietf:params:oauth:token-type:access_tokenno
Other fields from the Specification are not supported at the moment.
Sample request
POST /oauth/token
Content-Type: application/x-www-form-urlencoded
grant_type=urn:ietf:params:oauth:grant-type:token-exchange&subject_token=API-TOKEN
With curl:
curl -d grant_type=urn:ietf:params:oauth:grant-type:token-exchange -d subject_token=API-TOKEN
The response is in JSON format:
{
  "access_token":"GENERATED-JWT",
  "issued_token_type":"urn:ietf:params:oauth:token-type:access_token",
  "token_type":"Bearer",
  "expires_in":14399 
}
  • access_token - the generated JWT access token
  • issued_token_type - the type of returned token, always urn:ietf:params:oauth:token-type:access_token
  • token_type - how to use the token, always Bearer
  • expires_in - validity of the token in seconds

Using JWT in APIs

Use the token to access Platform APIs of specific application - passing it in HTTP Authorization Header:
Authorization: Bearer GENERATED-JWT
I