I [create] accessToken and refreshToken.
And I returned it like above.
The access token I created was valid for a certain period of time, but after a certain period of time, the access token and refresh token changed and were being sent to the Authorization URI.
(1) I should not make these token? Who make these?
(2) If so how can I get these tokens?
(3) And how can I exchange accesstoken use refreshtoken? Should I recreate accesstoken?
(grant_type = refresh_token)
Are you working with ST Schema? If so, are you using the Node JS SDK?
I just want to clarify this because OAuth Integration refers to another integration type where no Device Cloud Credentials are defined in the Developer Workspace.
The access token allows your cloud to communicate with the SmartThings platform.
In the Schema Connector, the access token is used to send callbacks with status updates or discoveries to ST.
If you’re using the ST Schema NodeJS SDK, you can check the example of the configuration to get access tokens here
Yes, you need to refresh the Access Token if it’s expired
The access token is valid for 24hrs. In ST Schema, the Refresh Token is valid until you delete the integration and the user needs to log in again.
Please, let me know if you have more doubts, we can go step by step, no problem.