I have a cloud based application that needs to be notified when events occur on SmartThings devices (e.g. door opened, button pushed, etc.). This is a shared application so these devices will be on a number of separate accounts.
So far I’ve created a WebHook API in my application that supports the full lifecycle and configured a set of even registrations to fire the data at me. I’ve also configured an Automation to point to it.
So far so good. On my account with the installation manually installed everything works perfectly.
The next stage is to make the app more generally available. I would prefer not to set up a developer account for each location (there are 500 of them, possibly expanding to 5000!)
I put in a support request and was told that I need to register my app with them and use an OAuth integration.
I’ve completed the registration form which is a apparently the first step and, if I understand correctly, this will somehow grant my app the ability to be more widely installed once it is approved.
In the interim I should be able to test everything on my own account and this is where it all falls down.
The documentation on OAuth integration is, at best confusing and in places contradictory.
I’ve set up an OAuth client and, depending on which of the many different authorization URIs I use I either get my credentials rejected, an uninformative “invalid request” response or one that says my callback URI is not one of the registered values. ("[https://api.smartthings.com/installedapp]")
There is no option to specify a callback URI for Automations so I’m a bit stumped.
If I create a standard (Groovy) smartApp I get the option to specify a callback URI (or make it unrestricted) and can follow the whole process through to the getting a token, but not for an automation.
I asked support for assistance on this a week ago but have yet to get a response.
Has anyone got this working and can give me a clue as to what I’m missing?