am encountering an issue with the OAuth flow for my SmartThings Developer Workspace app.
When I try to initiate the OAuth authorization, the URL redirects to an invalid domain:
oauth-direct.stinternal.net/login
This causes an error: “The requested URL could not be retrieved — Invalid URL”.
How I constructed the OAuth URL:
I manually created the OAuth authorization URL using the following components:
-
App ID (not Client ID): [App ID value]
-
Scope:
i:deviceprofiles r:customcapability r:devices r:locations r:rules r:scenes w:devices x:devices -
Redirect URI: My Google Apps Script Web App URL (properly URL-encoded), for example:
https://script.google.com/macros/s/AKfycb32eYPoM6zKWFJYEs9by_IyiH867NrmwRBGpBYiS4AzU_yetUW3jW8qsqap-WF9OFm/exec
The OAuth URL I generated looks like this:
https://auth-global.api.smartthings.com/oauth/authorize?client_id=[App ID]&response_type=code&scope=i:deviceprofiles%20r:customcapability%20r:devices%20r:locations%20r:rules%20r:scenes%20w:devices%20x:devices&redirect_uri=[URL-encoded Google Apps Script URL]&state=12345
Issue:
Despite using the official authorization URL as above, the OAuth flow redirects to the invalid domain oauth-direct.stinternal.net, which is not publicly accessible and causes the invalid URL error.
Request:
Could you please help clarify:
-
Why the OAuth flow is redirecting to
oauth-direct.stinternal.netinstead of the officialauth-global.api.smartthings.comendpoint? -
Whether I might have misconfigured something in the Developer Workspace app settings?
-
Any recommended steps to fix this redirect issue?
Thank you for your assistance!
Best regards,
Arun
Account : ntaarunb@gmail.com