Refresh token

After expiration of the original received access token, a refresh token can be used to acquire a new access token. Send a HTTP POST request to https://app1pub.smappee.net/dev/v1/oauth2/token

POST /dev/v3/oauth2/token HTTP/1.1 Host: app1pub.smappee.net Content-Type: application/x-www-form-urlencoded;charset=UTF-8 grant_type=refresh_token& refresh_token=[YOUR_REFRESH_TOKEN]& client_id=[YOUR_APP_ID]& client_secret=[YOUR_CLIENT_SECRET]

If the server processed your call successfully you will receive a HTTP OK error with the renewed access token and a new refresh token.

Just like with the original authentication call, the new access token can be used to access the API calls and the refresh token can be used to refresh access after the expiry period of 10 hours (36000 seconds).

HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Cache-Control: no-store Pragma: no-cache { "access_token":"f73fd163-68da-3d90-95da-a7cf20b7f179", "expires_in":36000, "refresh_token":"6d01da8f-d0bd-3e55-bba9-1ab7a31d6fe5", }