Add a user
POST http://{{ipAddress}}/api/v1/new
A user is authorized to access the OpenAPI if they can demonstrate physical access of the Light Panels.
Generate an authorization token
- On the Nanoleaf controller, hold the on-off button for 5-7 seconds until the LED starts flashing in a pattern.
- From the Qodex app or your own app, send a POST request to the authorization endpoint within 30 seconds of activating pairing, like this (substituting the IP address and port for your central controller):
http://192.188.x.x:16021/api/v1/new
The result returned will be a 32-character authorization token that you will use in all of your subsequent calls.
Refer to Section 6 of the Nanoleaf Open API Documentation.
Note: In this request's test script, the auth token value will be set as an environment variable called authToken
. If you already have an authorization token that you'd like to use, update the Qodex environment with your token.
RESPONSES
status: OK
{"auth_token":"zbp3aHIDoj0Ox2iAr857WMFck58mOBaL"}