Creates and returns access and refresh tokens for the given user and access rights.
Request
HTTP Request
POST /token/create
Authorization
Access JSON Web Token (ManageToken)
Request Body
In the request body, supply user identifier, rights and expiration date.
Available actions are listed here.
Property Name | Required | Type | Description |
---|---|---|---|
userId | Yes | integer | User identifier. |
expiration | No | datetime | Expiration date (UTC). |
actions | No | array | A collection of allowed actions. Available values: |
networkIds | No | array | A collection of identifiers of allowed networks. Only API requests for devices within the allowed networks will be authorized with this permission. Set to null to allow callees to access all networks permitted for the owner user. |
deviceTypeIds | No | array | A collection of unique identifiers of allowed device types. Only API requests for allowed device types will be authorized with this permission. Set to null to allow callees to access all devices permitted for the owner user. |
Response
If successful, this method returns a pair of access and refresh tokens.
Property Name | Type | Description |
---|---|---|
accessToken | string | Access JSON Web Token. |
refreshToken | string | Refresh JSON Web Token. |
Updated 2 years ago