This is a utility that assists with generating an access token and retrieving the endpoint URI for a self-published SmartApp.
You will need to get the "Client ID" and "Client Secret" from the OAuth section of the Smart App's Settings page. This page will redirect you to the SmartThings site where you can set the permissions for the application, then will return to this page where the REST endpoint and Access token can be retrieved.
For more information, see the OAuth documentation in the Smartthings developer documentation.
Note: this tool does not save any information you submit to the server, the entire process is handled from the web browser in Javascript. The client id is temporarily stored in a cookie until the OAuth authorization code is returned via callback, but authorization codes, and secrets are not retained.
Enter the Client ID:
Enter the Client Secret:
You can retrieve your tokens using the following commands. On Windows, open the powershell application, on Mac or Linux use the Terminal program.
Get Auth Token On Windows:
Get Auth Token On Mac/Linux:
Replace the string ACCESS_TOKEN in the following with the token you recieved.
Sorry, the SmartThings OAuth service doesn't set a Cross Origin Resource Sharing allow header, so this can't be done automatically in a web browser.
Get REST Endpoint URI On Windows:
Get REST Endpoint URI On Mac/Linux: