Create new token
- Authentication
This method requires authentication.
Summary
Create New Token
Description
This method generates a new authorization token.
Note that expiresIn refers to the time (in seconds) until the token expires. By default, it equals 864000 seconds or 10 days.
Body Parameters
name | type | data type | default | description |
|---|---|---|---|---|
expiresIn | optional | integer | 864000 | token ttl in seconds |
Response
The response data contains a token object.
Good Response Example
{
"status": "ok",
"statusCode": 200,
"data": {
"_id": "token-id",
"login": "your-login",
"token": "your-token",
"partner": "your-partner-id",
"active": true,
"expires_at": "2024-02-01T12:49:56.319Z",
"created_at": "2024-01-01T12:49:56.319Z",
"updated_at": "2024-01-01T12:49:56.319Z"
}
}
Bad Response Examples
http code | response example |
|---|---|
| see 401 Unauthorized |
|
Last modified: 09 February 2024