I want to get device details by calling SmartThings API from my Web Application. I have generated personal access token by logging into SmartThing Account.
Is there any API to create and refresh access token?
What is the expiry of token?
I want to call API in a web job to collect the device data and make a report.
Also wanted to verify if i am going in right direction by consuming API (http calls from my web application) to get the device list.
Do i need to create any Smart App? little confused between API and Smart App use cases..
SmartApp Tokens are bound to a location context, i.e., you can only access items and installations that exist on the location where the SmartApp was installed, and one advantage of them is that you can integrate context-based APIs and features, such as Subscriptions and Schedules.
On the other hand, a Personal Access Token provides you access to your whole SmartThings ecosystem, which in my opinion is mostly useful for maintenance of your integrations e.g. to update the OAuth parameters of an ST Schema Integration or to patch the OAuth Scopes of a SmartApp Automation/Connector.
So, you may need to interact with both at some point, but for implementation purposes, I recommend you using SmartApp Tokens.
I cannot get a Personal Access Token from SmartThings. Add a little smartness to your things.. When clicking “Generate new token”, the page loads forever. Opening the browser developers tool, I figured out that the page called under the hood is returning an HTML with the message “An unexpected error occurred”. Is this method still valid? Can I do something? (I’m using 2FA)