Open Token and Secret Key
Note: You must update the app to the latest version, V6.14 or later, in order to get the secret key.
In SwitchBot API v1.1, the authentication method has been improved. In order to gain access to private data through the API, you must generate a unique signature using a token and a secret key. When you make a request, the Authorization token and signature will be validated simultaneously.
You as a developer will then be able to add, delete, edit, and look up your data including profile data and data associated with the devices that have been added to your SwitchBot account.
To continue to use SwitchBot API v1.0, refer to the legacy document.
How to Sign?
We have attached a python script for you to quickly generate a sign. If you prefer to write your own script or routine, here is the procedure.
Print the 13 digit timestamp and concatenate it with your token Create a signature using your secret and the string produced in the previous step Convert the signature to upper case