Get New Access Token Using Existing Refresh Token

Endpoint Name: getaccesstokenfromrefreshtoken

Request type : POST

Authorization : Bearer Token as header

Note: Please call this endpoint at certain interval before the token expiration time, 10 mins will be an appropriate amount of time as per our implementation. An expired access token can give 401 unauthorized error.

Endpoint Details: The getaccesstokenfromrefreshtoken endpoint will be used to get access token from refresh token.

Method

URL

POST

URL/access/klearstack/getaccesstokenfromrefreshtoken

Parameters

Description

Required or Optional

refresh_token

Refresh token must be passed in request body to get new access token

Required

company_name

Name of the company for which the user is logging in

Required

API Response

Status code

Example Response

200

{

"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjU2NTc2MDM4LCJpYTY1NzU5MTgsImp0aSI6IjQwMWZlYmJhODg4NDQ1MmRhN2Q3ZTA5ZjEwZmYwOWFkIiwidXNlcl9pZCI6MjZ9.sjU6iVbRRp7dTDt-l4rj7K7tKpPpaL7yskjstAUn2Zs",

"release_version": “7.8.9”

}

500

One or Many Required parameters from company name must be missing, E.g error “refresh_token”,

Last updated