Authorization in Intellect using a token key provides the following capabilities:

Only a registered Intellect user can receive the token. If you don't specify the login and password for the Basic authorization in the request, the server will return "500 Internal Server Error".

General format of request:

GET/POST http://{login}:{password}@IP-address:port/token?expires_in={expires_in}

Request parameters:

Parameter

Required

Description

login YesUser login in Intellect
passwordYesUser password in Intellect
expires_inNo

Token validity time in seconds. The maximum value is 1 day. The token expires after a specified period of time.

The default value is 1800.

To log out, specify the value 0.

Note. There can be only 1 token for each user

Request example:

GET/POST http://USER:PASSWORD@127.0.0.1:80/token?expires_in=1800

Response example:

{
"access_token":"PJ_eHSwUsqjXX7PRZMB8hm_zKEnCg3hE"
"token_type":"bearer"
"expires_in":"1800"
}

Response parameters:

Parameter

Description

access_tokenToken
token_type

Token type

expires_inToken validity time in seconds