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 NameRequiredTypeDescription
userIdYesintegerUser identifier.
expirationNodatetimeExpiration date (UTC).
actionsNoarrayA collection of allowed actions. Available values:
GetNetwork: get information about network
GetDevice: get information about device and device class
GetDeviceState: get information about current device equipment state
GetDeviceNotification: get or subscribe to device notifications
GetDeviceCommand: get or subscribe to commands sent to device
RegisterDevice: register a device
CreateDeviceNotification: post notifications on behalf of device
CreateDeviceCommand: post commands to device
UpdateDeviceCommand: update status of commands on behalf of device
networkIdsNoarrayA 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.
deviceTypeIdsNoarrayA 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 NameTypeDescription
accessTokenstringAccess JSON Web Token.
refreshTokenstringRefresh JSON Web Token.