I’m working on creating SmartApp in C#.
Looking for info on the authentication interaction - pretty much looking to implement from scratch.
Based on my understanding from here (Lifecycles | SmartThings Developers), at the INSTALL phase, the authentication tokens are received:
“authToken”: “string”,
“refreshToken”: “string”,
Is this authToken the token to use with the Bearer header?
Trying to follow the directions here: (OAuth Integrations | SmartThings Developers)
And then based on this last link, do I refresh the bearer token by posting to the authentication server with the PAT? Or what is the sequence of events/requests to get the token refreshed?
And that needs to happen every 24 hours or so?
In the OAuth framework you get an Access Token and a Refresh Token, the first is used as authorization in the requests and it expires in 24hrs, the other helps you get new Access tokens.
Thanks for your response.
I’ve followed these posts and instructions, and have tried to implement the refresh token to get a new token using the logic in Adam Green’s post:
I tried creating that request also with Postman (timed it right after the installation of the App just to be able to use an updated refreshtoken), and the return is again not what I would expect.
Would it be possible to help me construct the appropriate refresh token request or point me in the right direction?