SmartThings support has been removed from the Home Remote. It will be added back in once SmartThings fixes this issue.
Now I want to show exactly why the Home Remote software is failing to get the access token. There are 2 steps outlined in the SmartThings help documentation that I will go over with you so you can see for yourself. The steps are, 1 - “Get the OAuth Authorization Code”, 2 - “Get the API token”. Now I am assuming that you’ve already created your web service (I think most of you already have). You will need your OAuth Client ID & Secret.
Here’s a link to the SmartThings documentation that describes these steps.
I will go over them in a little more detail & show you exactly what I did. I myself am a Windows user & I didn’t have curl on my PC. If you are like me, you need to download it.
Here’s a link to the curl downloads.
Direct link for those of you using 64-bit Windows
You will need the SSL version & I am running on a 64 bit machine so I downloaded “curl-7.33.0-win64-ssl-sspi.zip”. I extracted this to “C:\curl-7.33.0-win64-ssl-sspi”.
Here’s what I’m doing. In all of these steps please replace CLIENT_ID, CLIENT_SECRET, & CODE with your values. You will retrieve CODE in step 1. You should already have CLIENT_ID & CLIENT_SECRET.
1 - Open web browser & go to https://graph.api.smartthings.com/oauth/authorize?response_type=code&client_id=CLIENT_ID&scope=app&redirect_uri=https%3A%2F%2Fgraph.api.smartthings.com%2Foauth%2Fcallback
2 - Click authorize which will give you the CODE you need (copy that).
3 - Open the Windows Command Prompt.
4 - Send this command => cd C:\curl-7.33.0-win64-ssl-sspi
5 - Send this command => curl -k -u CLIENT_ID:CLIENT_SECRET “https://graph.api.smartthings.com/oauth/token?code=CODE&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fgraph.api.smartthings.com%2Foauth%2Fcallback&scope=app”
(Please note that Windows doesn’t like single quotes. So this request in step 5 will appear slightly different than what SmartThings describes in their documentation. I also added the -k option to ignore certificate errors.)
As you can see this request fails & returns the following JSON which does not include an access token.
“error_description”: “Remote OAuth2 token request failed with code: 401, text: Unauthorized”