[POST] Get Token

POST /v1/login_check

The request is designed to receive a token that is later used to authorize the user when working with other API.

content-type
string
required
It must be equal to "application/json".
username
string
required
Your login for working with the API. It is provided to you when connecting to the API.
password
string
required
Your password for working with the API. It provided to you when connecting to the API.
{
  "username": "user",
  "password": "1234"
}

In response to the request, you receive the server response code corresponding to the processing result. Depending on the code, the response body may contain additional parameters.

If processing is successful, the following will return in response:

  • Server response code: HTTP/1.1 200 ОК.
  • Response body: authorization data in JSON format.
date
string
required
Date and time of token creation.
token
string
required
Authorization token.

NOTE: A token received is valid for 24 hours from the moment of receipt. If a new token is received before the previous one expires, then the previously received token remains valid.

refresh_token
string
required
Technical parameter (not used for authorization).
{
  "token": "fj45u923j59ju42395iu9423i59243u0",
  "refresh_token": "4e283bb7620068c42d6"
}

If an error occurs while processing the request, you receive a server response code corresponding to the result of processing.
Depending on the code, the response body may contain additional parameters.

HTTP Server Response Error Code

HTTP code Description
HTTP/1.1 400 Bad Request The request is not valid (error in parameters; necessary data is not transferred, etc.).
An additional error code (one or more) will be transferred in the response bodу.
HTTP/1.1 401 Unauthorized Unsuccessful authorization.
An additional error code (one or more) will be transferred in the response bodу.
HTTP/1.1 404 Not found Invalid request URL. 
HTTP/1.1 500 Request Error Internal Server Error. Please try again later or contact support.
Error Message Description
If at least one error from the list below is found, then it returns in response to a request, other errors are not validated.
110 JSON is not valid. The request cannot be processed. Request field structure is not valid. Check the fields in the request body against the JSON format.
111 Invalid data format (Content-type). The request cannot be processed. Invalid request header. Content-type must be equal to application/json.
1005 Invalid authorization data. The request is not valid, the data required is missing, etc.
Error Message  Description
If at least one error from the list below is found, then it returns in response to a request, other errors are not validated.
1006 Bad credentials. Authentication failed.
errors
array [objects]
required
Error list.
errors / [error object]
/
error
number
required
Error code.
errors / [error object]
/
message
string
required
Error description.
{
  "errors": [
    {
      "error": 1005,
      "message": "Invalid authorization data."
    }
  ]
}