Get Access Token

Endpoint Name: get_access_token

Request type : POST

Authorization : None

Endpoint Details: The get_access_token endpoint will be used to get the access token and the refresh token, The validity of the access token will be some minutes, and the refresh token will be days.

Method

URL

POST

URL/access/klearstack/get_access_token

Request Body

Parameters

Values

Required

Description

username

string

Yes

Username of the user to be logged in.

password

string

Yes

Password of the user.

company_name

string

Yes

Name of the company for which the user is logging in.

Request Code Samples

Shell

  • Request Body

curl --location "URL/access/klearstack/get_access_token" \
  --form "username=Replace_User_Name_Here" \
  --form "company_name=Replace_Company_Name_Here" \
  --form "password=Replace_Password_Here"

Python

  • Request Body

Java (OkHttp)

  • Request Body

Nodejs (Axios)

  • Request Body

Javascript (XHR)

  • Request Body

API Response

Status code

Example Response

200

{

"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTY1NjU3NjA5OCwiaWF0IjoxNjU2NTcdGkiOiI1ZmEzNGM4YjUyOGI0OWM3OWQzNjk5ZWJlNDRlYzUwZiIsInVzZXJfaWQiOjI2fQ.kvpMWPuxenw2c55nucfQCxHLipiO4DhK2TC5NKpJZEk",

"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 “Company Name”,

Last updated