Skip to content

Postman collection and environment for Nanoleaf API

Notifications You must be signed in to change notification settings

loopDelicious/nanoleaf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

Nanoleaf

From Section 7 of the Nanoleaf Open API Reference. Requires setting up a developer account and signing in to their developer portal.

nanoleaf logo

Click the Run in Postman button below to import this Postman Collection and Environment into your local instance of the Postman app.

Run in Postman

Generate an authorization token

  1. On the Nanoleaf controller, hold the on-off button for 5-7 seconds until the LED starts flashing in a pattern.
  2. From the Postman 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

Finding your IP: The IP address of your Nanoleaf can be found using your router. Once you have the Nanoleaf connected to your WiFi, go to your router webpage and browse the devices connected to your network. Once you find your Nanoleaf, you can see the IP assigned to the device.

Remember if you're accessing the Nanoleaf at a local IP address, like when your router assigns a local IP address to the connected devices, both the Nanoleaf device and the client accessing the Nanoleaf (Postman) must be on the same local network. For example, both the Nanoleaf and laptop with Postman should be connected to the same WiFi network.

The result returned will be a 32-character authorization token that you will use in all of your subsequent calls.

Quickstart

  1. Update the Postman environment with your IP and port.
  2. If you already have an authorization token, update the Postman environment with your token. Otherwise, you will need to use the Add a user POST request to generate an authorization token.

In this Postman collection, I added a Quickstart folder to group a handful of requests to demonstrate a possible workflow (visible in the pre-request and test script sections). The remaining folders are replicated from the Nanoleaf Open API Reference. For more details and to see example responses, check out the collection documentation.

nanoleaf documentation

About

Postman collection and environment for Nanoleaf API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published