diff --git a/docs/topics/oauth2.mdx b/docs/topics/oauth2.mdx index 33713ebad3..6aeeabc662 100644 --- a/docs/topics/oauth2.mdx +++ b/docs/topics/oauth2.mdx @@ -135,7 +135,9 @@ In response, you will receive: } ``` -Having the user's access token allows your application to make certain requests to the API on their behalf, restricted to whatever scopes were requested. `expires_in` is how long, in seconds, until the returned access token expires, allowing you to anticipate the expiration and refresh the token. To refresh, make another `POST` request to the [token URL](/docs/topics/oauth2#shared-resources-oauth2-urls) with the following parameters: +Having the user's access token allows your application to make certain requests to the API on their behalf, restricted to whatever scopes were authorized. `expires_in` is how long, in seconds, until the returned access token expires, allowing you to anticipate the expiration and refresh the token. The refresh token does not have a specific lifespan, though users can deauthorize your app at any time, which will cause both the active `access_token` (if any) and the `refresh_token` to expire. + +To attempt refreshing, make a `POST` request to the [token URL](/docs/topics/oauth2#shared-resources-oauth2-urls) with the following parameters: - `grant_type` - must be set to `refresh_token` - `refresh_token` - the user's refresh token @@ -162,7 +164,7 @@ def refresh_token(refresh_token): return r.json() ``` -Boom; fresh [access token response](/docs/topics/oauth2#authorization-code-grant-access-token-response)! +Boom; fresh [access token response](/docs/topics/oauth2#authorization-code-grant-access-token-response) with a new `access_token` and `refresh_token`! ###### Token Revocation Example