My question is regarding the OAuth flow: Is there a way to request re-generation of the refresh token for a user? (besides reinstalling the app and going through the installation flow again)
Hi @Sadat
To obtain OAuth access and refresh tokens, follow these steps:
-
Make a URL-form encoded POST request to
/oauth/v1/token.- In the request body, include the following authentication parameters:
client_idclient_secret- The
codereturned via the redirect URL.
- In the request body, include the following authentication parameters:
-
Redirect URL and code generation:
- After a user authorizes your app, the redirect URL will include a
codevalue. - Use this
codeto generate the initial access token and refresh token.
- After a user authorizes your app, the redirect URL will include a
-
Access token lifetime:
- Access tokens are short-lived.
- You can verify their lifespan using the
expires_inparameter, which provides the lifetime in seconds.
-
Generating new access tokens:
- To generate a new access token, make another URL-form encoded POST request to
/oauth/v1/token. - In the request body, specify:
grant_typeclient_idclient_secretrefresh_token
- To generate a new access token, make another URL-form encoded POST request to
For additional details, you can check here.
Did my post help answer your query? Help the community by marking it as a solution.
Thanks.