Hi, @hoon2
What do you mean by “if I call POST API”?
This endpoint is used to handle the requests made by ST to open the ST app and go through all its lifecycles.
The sample you mentioned is from 5 years ago, have you verified you have all the recent versions of the packages installed?
SmartApps and API_ONLY/OAuth-In apps are different.
SmartApps are the only ones that can be created from the Developer WS, the others are available only through the CLI.
We cannot use a SmartApp project for an API_ONLY app flow and vice versa.
SmartApps can be only installed through the ST app while the flow to authorize API_ONLY apps can be started from another source like an external website.
So, to work with that example you mentioned, I’ll leave some steps here:
Clone the repository and install all the NPM packages
Configure your .env file as shown in the instructions and start the server to get the URLs you need to use for the registration
Register your OAuth integration app as shown in the instructions. Remember the targetUrl and redirect URI are shown in the server’s logs.
You’ll get a confirmation URL in your server which you need to copy in a browser to do a GET request.
Then, enter the server’s URL in a browser to see the main page.
Click on “Connect to SmartThings” and authorize the app to access your location.
Then, this should show you a page where your devices are listed and you can send commands to them