Activation code
OPTIONS /activationCode
Purpose
Provides CORS support information for the endpoint.
Responses
Always 200 OK
with CORS response headers.
POST /activationCode
Purpose
Generate an activation code for a device.
Payload
Type
JSON in body.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
deviceId | Yes | String | Unique identifier of a device. |
deviceType | Yes | DeviceType | Type of device. |
stationId | Yes | UUID | ID of the station associated with the device. |
Responses
- 200 OK
- 400 Bad Request
- 403 Forbidden
- 405 Method Not Allowed
JSON body with two properties:
code
: Unique six digit code associated with the provided deviceId.qrCodeUrl
: URL to generate a QR code for a viewer to scan and access the activation form in a browser.
JSON body with one property:
reason
: Code string indicating the reason for the error:ALREADY_REGISTERED
: ProvideddeviceId
is already registered to a viewer.MISSING_PARAMETERS
: Required payload parameters are missing.NO_UNIQUE_CODE
: The function was unable to generate a unique activation codeSTATION_NOT_FOUND
: ProvidedstationId
not found.UNKNOWN_DEVICE_TYPE
: ProvideddeviceType
not valid.
Indicates an invalid Origin
header was passed in a CORS request.
Returned for any unsupported HTTP method.
POST /activationCode/startOAuth
Purpose
Initiate an OAuth flow for a device activation.
Payload
Type
JSON in body.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
code | Yes | String | Code associated with a known device. |
stationCallSign | Yes | String | Station call sign associated with the device. |
Responses
- 200 OK
- 400 Bad Request
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
JSON body with one property:
state
: State value to be included with the OAuth flow. See The OAuth 2.0 Authorization Framework for details about how to use this value.
JSON body with one property:
reason
: Code string indicating the reason for the error:BAD_PAYLOAD
: MalformedPOST
body of missing required parameter.
Indicates an invalid Origin
header was passed in a CORS request.
Indicates the device could not be found with the provided code parameter.
Returned for any unsupported HTTP method.