Oauth Problems

Hi,
trying to authorize with Oauth2 but always get 403 Forbidden

What I did:

  • Created SmartApp with Hosting Type Webhook
  • My redirect URL is a php script
  • Status is Deployed to test

curl -v SmartThings. Add a little smartness to your things. -d “response_type=code&client_id=xxx&redirect_uri=https://myurl/callback.php&scope=r:devices:* w:devices:* x:devices:*”

I get 403 and the redirect URL has not been visited.

Whats wrong?

Thanks, Werner

when trying:

curl -v “https//account.smartthings.com/oauth/authorize&response_type=code&client_id=xxx&redirect_uri=https://myurl/callback.php&scope=r:devices:*” -u “client:secret”

I get 307 Temporary Redirect but my callback URL still not visited

OK so that sounds like a Webhook SmartApp and as it is deployed to test it should be visible in the mobile app under Discover on the Routines page. That’s the same place where templated routines and Smart Lighting (if available) appear.

You would then create an instance of that app by clicking on it and you app would be taken though the CONFIGURATION lifecycle and so on as documented.

That, on the other hand, is something you would do with an OAuth Integration, also known as API_ONLY or ‘API Access’.