Refresh tokens

When the token is near expiry, you can use the refresh token to get a new access token.

Method

POST /EAI/oauth/token

Content type

application/x-www-form-urlencoded

Example cURL requests

curl -X POST -H "Content-Type:application/x-www-form-urlencoded" -H "Authorization: Basic ZWFpLWNsaWVudDo=" -d "grant_type=refresh_token&client_id=eai-client&refresh_token=c11fbcad-fb04-4444- abce-1fd3923bc611" https://gateway.domain.com/EAI/oauth/token

curl -X POST -H "Authorization: Basic ZWFpLWNsaWVudDo=" -H "Content-Type: application/json" "https://gateway.domain.com/EAI/oauth/token?grant_type=refresh_token&client_id=eai-client&refresh_token=7123fb5e-47a8-4c63-a913-85064b29dc0c"

Request parameters

Table 1. Request parameters
Parameter name Description
grant_type Required parameter is refresh_token.
client_id Required parameter is eai-client.
refresh_token Provides the refresh_token during the authentication.

Example response

{
access_token: "4ed14dd2-d4f3-4089-8f06-02ae42a08420"
token_type: "bearer"
refresh_token: "c11fbcad-fb04-4444-abce-1fd3923bc611"
expires_in: 3194
scope: "read"
}

Returns

200: OK for success.
401: Unauthorized for every other response.
403: Forbidden if the account is locked for any reason.