[Pub] Generate device token from policies request

Given a device and an organization use organization policies to generate a device token that will be returned as a QR code. Scanning the qr code will consume the token and associate the device to the user

Request Topic and Payload

Topic

things5-production/v1/devices/<device-id>/req/generate_device_token_from_policies_req

Payload Representation

{
  "request_id": "87049f68-696f-4be8-a6cc-bf827c04ed0e",
  "type": "qr",
	"organization_id": "50867a80-c228-4db6-9fec-15bd72efc83a"
}

The request_id will be returned in the response. It can be used to match the request with the response. Should be random generated.

Payload Parameters

namedescriptionexample
request_idthe request id to be sent back by the device when sending the response
typetype of response that will be sent. Qr is only type supported right now
organization_idthe organization where the device
things5_hostoptional. If provided the qr code response will contain a url build using things5_host instead of text data.