API access ๐
In this section we will explain how to start using our API.
For more information about them, check the API reference documentation.
Enable API access
The access to the APIs needs to be enabled in order to obtain the credentials to authenticate your requests so we can keep your data safe from burglars!
Enabling API access is a no brainer:
- go to
API
page - click
Enable API access
button.
This will give you the Client ID
and Client Secret
, if you lose them you can check in the Settings
page whenever you want, but remember to keep them safe and don't give them to anyone!
In fact anyone who knows your Client ID
and Client Secret
can make API requests on your behalf.
Control a device using API
Let's now make an example to use the API access to control a light bulb. For
Before going on with this section you need to have a Gateway correctly connected and a paired device. If you don't, just follow these tutorials:
Once the API access has been enabled, copy the following information to use them in the next step. They are all available in the Settings
page:
Base url for API access
Client ID
Client Secret
Now you are ready to control the bulb!
Change bulb state
Go to the Light Bulb Demo Application and fill the form with the information you collected at the previous step.
Click Access application
and choose your bulb device
Now you can turn it on and off, change the color and modify the brightness! Enjoy! ๐ก