Solutions
worksection
beta
help
Worksection OAuth 2.0 access token
Access data can be obtained by making a POST request to the URL of the token with the authorization code:
https://worksection.com/oauth2/tokenThe 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 authorization_code. |
| code | The authorization code (see details). |
| redirect_uri | URI where the response will be redirected. The URI must meet the requirements of the OAuth2 standard and use the HTTPS protocol. |
CURL example:
curl -X POST -d "client_id=<client_id>&client_secret=<client_secret>& grant_type=authorization_code&code=<authorization_code>&redirect_uri=<redirect_uri>"Example response:
https://worksection.com/oauth2/token
{
"token_type": "bearer",
"expires_in": 86400,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJh...",
"refresh_token": "def502005534a202e9e8effa05cdbad564015604f34...",
"account_url": "https://authorizeduseraccount.worksection.com"
}The received access_token and refresh_token will be used in subsequent requests to access the API and update the access_token. The access_token is valid for 24 hours, the refresh_token is valid for 1 month.
Leave your review
Did this article help you?
Glad we could help! What was helpful?
Sorry this didn't help. What went wrong?