token/create
Creates access and refresh tokens by payload.
Authorization
Access JSON Web Token (ManageToken)
Available actions are listed here.
Request Topic and Payload
Topic
dh/request
Payload Representation
{
"action": {string},
"requestId": {object},
"payload": {
"userId": {object},
"actions": {array},
"networkIds": {array},
"deviceTypeIds": {array},
"expiration": {datetime}
}
}
Payload Parameters
Property Name | Required | Type | Description |
---|---|---|---|
action | Yes | string | Action name: token/create |
requestId | No | object | Request unique identifier, will be passed back in the response message. |
payload | Yes | object | User payload with specific permissions |
payload.userId | Yes | integer | User identifier. |
payload.actions | No | array | A collection of allowed actions. Available values:
|
payload.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. |
payload.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. |
payload.expiration | No | datetime | Expiration date (UTC). |
Response Topic and Payload
Topic
dh/response/[email protected]{clientId}
Payload Representation
{
"action": {string},
"status": {string},
"requestId": {object},
"accessToken": {string},
"refreshToken": {string}
}
Payload Parameters
Property Name | Type | Description |
---|---|---|
action | string | Action name: token |
status | string | Operation execution status (success or error). |
requestId | object | Request unique identifier as specified in the request message. |
accessToken | string | JSON Web Token for authorization. |
refreshToken | string | JSON Web Token for refreshing access token. |
Updated about 4 years ago