Refresh Token (POST /v2.0/authorization/refresh_token)

This method is used to get new access token when the token in use has expired.

Request Parameters

 

Request Headers

Header Value
app_auth_type jsign-oauth2

Request Body

Field Type Required Description
access_token String Yes Expired access token
refresh_token String Yes Refresh token

Response Parameters

 

Response Body Message Field

Field Value
message The returned message containing the refresh token

Response Body Data Fields

Field Always Preset Notes
access_token Yes  
refresh_token Yes  
token_type Yes  
expires_in Yes Expiration time in Unix timestamp

 

Sample Success Response

REQUEST:
curl --location --request POST '/api/v2.0/authorization/refresh_token' \
--header 'app_auth_type: jsign-oauth2' \
--header 'Content-Type: application/json' \
--data-raw ''

"token":"eyJhbGciOiJSUzI1N[....]",
"refresh_token":"O0VikifpJctbGRfNjePZX0MA27SaakwRgdypOyErdeE="
}'

RESPONSE:
{
"message": "",
"data": {
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.ey [....]",
"refresh_token": "O0VikifpJctbGRfNjePZX0MA27SaakwRgdypOyErdeE=",
"token_type": "bearer",
"expires_in": 1618927271
}
}

Sample Error Response

REQUEST:
curl --location --request POST '/api/v2.0/authorization/refresh_token' \
--header 'app_auth_type: jsign-oauth2' \
--header 'Content-Type: application/json' \
--data-raw ''

"access_token":"eyJhbGciOiJSUzI1N[....]",
"refresh_token":""
}'

RESPONSE:
{
"errors": [
{
"error_code": "REFRESH_TOKEN_REQUIRED",
developer_message": "Refresh Token is required."
}
]
}

Note: View the full list of applicable error code for this method here.

Return to the top of this page.