invalid_scope error when attempting to get OAuth token

(Benjamin Smith) #1

I’m following the steps in

I am able to get a code from /oauth/authorize, but when I try to use it to fetch an access token from /oauth/token I get the following JSON:

“error”: “invalid_scope”,
“error_description”: “Invalid scope (none)”

I am using the client id and client secret found on the App Settings page of the app I’ve installed.

What am I doing wrong?

(Sghoweri) #2

@Benjamin - Same issue here at the exact same step in setting up OAuth. I almost gave up when I came across a simliar setup in the SmartThings Alfred Web Service.

It looks like the Authorize and Token requests are passing along a scope=app parameter which appears to have done the trick when I tried it on my end.

When you are requesting the Access Grant from /oauth/authorize, try including a parameter of scope=app and then include this scope=app parameter again when fetching the access token from /oauth/token.

Hope this helps!

(Benjamin Smith) #3


That totally works! Thanks! Any idea what the scope=app actually means and if there are other scopes you can request?