Hi, I’m trying to create a smart things device provider (read more about my setup here) but I’m running into an error. When going to add a device under “my testing devices” and setting up an OAuth connection, I run into an error 503. This is the whole timeline:
- Open smartthings app
- Go to “add device”
- Tap “my testing devices”
- Tap {my_app_name} under “my setup apps”
- Press next
- Get sent to oauth page
- This now correctly opens up my oauth flow, which sends the user (me) to the login page
- Oauth flow completes, user is redirected to the specified redirect URI, along with the generated OAuth code and the initially specified state. Full redirect URL is: https://c2c-eu.smartthings.com/oauth/callback?code=d0f4983d109612d3a331eb2b6a411e4210f78331&state=eyJhbGciOiJIUzM4NCJ9.Y2VlNTBiNDUtMDUwNS00Y2YyLTkxY2ItMDdkYzNhMTk5OTA2OnZpcGVyXzU2N2EzOTQwLTVjNWMtMTFlYy04NTFhLWVkZDAwNWFlZDAyYjoxNjQxNzYyNDk2NDg0OmIwNmMwMjZkLTRhYTYtNDczNy1iNmFhLWQ2NmEzMWQyNjY0Nzplbjo.ldWZ7Tkt22YUxGWsc66-_PrM1OSQhPyrG5ji2_vY4cTZTlS6rjENhT4PjF-l1G0R (this URL doesn’t work anymore since too much time passed)
- This page says that the connection between SmartThings and {my_app_name} encountered an error with some request code.
- Checking the network panel shows an error 503
- Notably, SmartThings never redeems the passed code for an OAuth access token. No requests from SmartThings arrive to the
/token
endpoint (or any endpoint for that matter).
Does anyone have any idea what I’m doing wrong here? This exact same flow works perfectly fine with Google Home. There seem to be no disruptions to the SmartThings status (see status page) so it’s probably not that. Is there anything I can do with the Request Code I’m passed? Just in case someone shows up who can do something with them, the request code is 7YUE9OJ.
In case you want to look into the code, the OAuth code can be found here.