Go to documentation repository
Page History
Authorization in Intellect using a token key provides the following capabilities:
- To specify the a token in the "token" parameter in a url request instead of specifying the "login" and password;"password" parameters.
Example of a video request with authorization in Intellect using a token key:
Code Block language xml http://127.0.0.1:80/video/action.do?normalize=true&version=4.10.0.0&video_in=CAM:1&token=EoHWC_zXFILImB0hL4QgjPc5624cJXMF
To use the Bearer Token Authentication in the "Authorization" parameter in the request header. For example
Example:
Code Block language xml Authorization: Bearer PJ_eHSwUsqjXX7PRZMB8hm_zKEnCg3hE"
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 |
Yes | User login in Intellect |
password |
Yes | User password in Intellect |
expires_in | No | 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:808580/token?expires_in=1800
Response example:
Code Block | ||
---|---|---|
| ||
{ "access_token":"PJ_eHSwUsqjXX7PRZMB8hm_zKEnCg3hE" "token_type":"bearer" "expires_in":"1800" } |
Response parameters:
Parameter | Description |
---|---|
access_token | Token |
token_type | Token type |
expires_in | Token validity time in seconds |