According to the API documentation at: API | Developer Documentation | SmartThings
It should be possible to let the user authenticate and grant permission to (api_only) apps to interact with the SmartThings platform.
The link shown in the docs (or any path on this domain): https://auth-global.api.smartthings.com
Will redirect to:
Which gives a DNS error: ERR_NAME_NOT_RESOLVED
I would expect that if I redirect the user to an url like this:
And the user authenticates + grants permissions to our app (with the above provided client_id), the user would be redirect back to the redirect url and our callback (defined in the
API_ONLY app) would be called with the necessary information to get an access token later on.
Is this something still in development?
Could we expect this to be live any time soon?
Hi @Martijn_Vermeulen Welcome to SmartThings Community
Please, Could you give more context about your integration?, for your previous comments I recommended that you check this OAuth Integrations | Developer Documentation | SmartThings. but if you share with me more context I will try to help you in a better way.
Good afternoon @AlejandroPadilla,
Our (ideal) integration will be a client app that let’s the user log in using the standard OAuth2 flow where:
- We redirect the user to SmartThing
- The user logs in and (possibly) allows our app to different scopes
- We redirect the user back to our redirect URI + we receive a request on the set callback url with the code to get the access token
From there, we intend to schedule smart devices from our app.
We use the OAuth url provided in the docs: API | Developer Documentation | SmartThings
(I’ve tried to append
/oauth/authorize to it, but everything gives a 302, redirecting to a seemingly internal url http://oauth-direct.stinternal.net/login).
Now, after browsing through the community a bit, I’ve found the following URL:
After setting up the right redirect URI on my app, everything worked well and as expected.
So it was mostly confusion caused by the API docs, it would help maybe to alter the OAuth docs a small bit (to make it a bit easier).
Thanks for the fast response and have a nice day.
It seems there’s an issue with the SmartThings API endpoint not resolving correctly, which is causing problems with authentication and authorization. To address this, I would recommend reaching out to SmartThings support or checking their community forums for guidance on resolving this specific problem.