POST /esignglobal/v1/oauth2/accessToken
接口描述
通過 app_id 和 app_secret 獲取鑒權 BEARER_TOKEN,用來請求後續業務 API。Token 有效時長為 24 小時。
請求參數
code | string | false | 授權碼,用戶授權完成後由eSignGlobal返回,grant_type為Authorization_code時必傳 |
refresh_token | string | false | 刷新token,只有在grant_type為refresh_token時,才需要提供刷新令牌 |
請求示例
curl --location 'http://………………/esignglobal/v1/oauth2/accessToken' \
--form 'client_id="LZn…………g89"' \
--form 'client_secret="5ugL0rM………………Yne7b"' \
--form 'grant_type="client_credentials"' \
響應參數
refresh_token | string | 用於刷新token,僅當grant_type為authorization_code或refresh_token時返回,有效期為30個自然日,過期後需要重新授權 |
響應示例
{
"access_token": "eyJhbGciOiJIUzI1N………………th1pMM3oYk",
"expires_in": 86398,
"scope": "read-write",
"token_type": "bearer"
}