Продукт
Рішення
https://worksection.com/oauth2/refreshPOST-запит має містити обов'язкові параметри:
| ПАРАМЕТР | ОПИС |
|---|---|
client_id | client_id, отриманий при створенні додатку. |
client_secret | client_secret, отриманий при створенні додатку. |
grant_type | Завжди вказуємо значення refresh_token. |
refresh_token | Токен оновлення, що був отриманий в методі /oauth2/token. |
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Приклад відповіді:
{
"token_type": "Bearer",
"expires_in": 86400,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1...",
"refresh_token": "def50200365724c970b6cea5eeecfed28...",
"account_url": "https://authorizeduseraccount.worksection.com"
}Запит оновлення повертає нові токен доступу та токен оновлення, що зробить старі токени недійсними.