Solutions
worksection
beta
help
Access token update OAuth 2.0
Once the access token becomes invalid, it needs to be refreshed. You can do this by using the refresh_token (obtained in the /oauth2/token method) and sending a POST request to the following URL:
https://worksection.com/oauth2/refresh
The POST request must contain the required parameters:
| PARAMETER | DESCRIPTION |
|---|---|
| client_id | client_id, received when creating the application. |
| client_secret | client_secret, received when creating the application. |
| grant_type | Always specify the value of refresh_token. |
| refresh_token | The refresh token that was received in the /oauth2/token method. |
CURL example:
curl -X POST -d
"client_id=<client_id>&client_secret=<client_secret>&grant_type=refresh_token&refresh_token=<refresh_token>"
https://worksection.com/oauth2/refresh
Example response:
{
"token_type": "bearer",
"expires_in": 86400,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1...",
"refresh_token": "def50200365724c970b6cea5eeecfed28...",
"account_url": "https://authorizeduseraccount.worksection.com"
}The refresh request returns a new access token and a refresh token, which will invalidate the old tokens.
"client_id=<client_id>&client_secret=<client_secret>&grant_type=refresh_token&refresh_token=<refresh_token>"
https://worksection.com/oauth2/refresh
"token_type": "bearer",
"expires_in": 86400,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1...",
"refresh_token": "def50200365724c970b6cea5eeecfed28...", "account_url": "https://authorizeduseraccount.worksection.com"
}
Leave your review
Did this article help you?
Glad we could help! What was helpful?
Sorry this didn't help. What went wrong?