How to expose SmartApp through an REST API to external applications?

(Coxi Dev) #1

Hi All,

Back then before the newly major introduced changes into the SmartThings ecosystem, it was easier (at least for me) to expose an already created SmartApp to external web apps via a REST API through endpoints mainly using this tutorial.

Now I’m a little bit lost in the new documentation and I cannot find how I can achieve the same thing using the new available architecture.

Could anyone advise on that?

Main goal is, from an external app (mobile or web), to:

  • Get updates from a multipurpose sensor;
  • Turn on/off a Siren.

Thank you!

(Joshua Lyon ( Dashboard)) #2

Have you looked at the new Samsung SmartThings API docs? Instead of you having to roll your own REST endpoint SmartApp, there are now a standard set of APIs:

(Coxi Dev) #3

Perfect! Thank you @joshua_lyon.
This seems exactly like what I’m looking for. I’ll have a look and mark the question as solved shortly.

(Coxi Dev) #4

Hi @joshua_lyon, finally I had some time to play around with the SmartThings API. Quite cool how much easier it is now to control/get device’s status.

Unfortunately, I didn’t find a way how to expose this to others. For example, let’s say I want to create a client that allows any user to control his Siren and get updates. How can I achieve that, knowing that “For SmartApp tokens, the scope is restricted to the location the SmartApp is installed into. For personal access tokens, the scope is limited to the account associated with the token.”?

(HousePanel Author) #5

One option is to invest the time to install HousePanel that creates endpoints for anyone to use that knows the URL of the HousePanel installation. Details are in this thread: