Add possibility to refresh existing OAuth token as access tokens have a limited duration.
Currently, I use a manual request that looks like this:
let rsp = await Wappsto.request.get(`/oauth_connect/${token_name}?refresh_token=true&verbose=updated`);
In case of rsp.status === 200, the token was successfully refreshed and I will note down the update time rsp.data.meta.updated, so I can calculate when is the next refresh due.
Note that you will need verbose=updated when obtaining an OAuth token, in order to know whether it is expired or not, upon retrieval.
Add possibility to refresh existing OAuth token as access tokens have a limited duration.
Currently, I use a manual request that looks like this:
In case of
rsp.status === 200, the token was successfully refreshed and I will note down the update timersp.data.meta.updated, so I can calculate when is the next refresh due.Note that you will need
verbose=updatedwhen obtaining an OAuth token, in order to know whether it is expired or not, upon retrieval.