How to refresh Trans.eu API access_token using refresh_token.

Important note: To utilize this authentication flow your application must have refresh_token grant type admitted.

 

Access token request

Example

  • Method: POST
  • URL: /ext/auth-api/accounts/token
  • Host: api.platform.trans.eu
  • Content-Type: application/x-www-form-urlencoded

Request parameters

Description of query parameters required during token refresh.

Name Required Type Description
grant_type yes string Must be set to refresh_token.
refresh_token yes string The refresh token issued during authorization.
client_id yes string Application client_id obtained during registration. Only required if Authorization header is not sent.
client_secret yes string Application client_secret obtained during registration. Only required if Authorization header is not sent.

 

Header parameters

 

Name Required Value
Content-Type yes application/x-www-form-urlencoded
Api-key yes Api-key obtained during registrationAccess token response

Example

HTTP/1.1 200 OK
Content-Type: application/json

{
  "access_token": "59d9aa9b15cd59a61fc52014792efb6caa82373b",
  "expires_in": 3600,
  "token_type": "Bearer",
  "refresh_token": "d52d1d998d6533a3be8e7f26f904be513287938b"
}

Response parameters

Name Description
access_token Access token to use by application for authorization.
expires_in Time in seconds until token expires.
token_type Type Bearer is returned as defined in rfc6749.
refresh_token Single serving token that can be used to extend lifetime of access token.