通过API方式,刷新access_token
url: ntWebAPI/v1/oauth2/refTokenAsync
Request Information
- Body Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| grant_type | 请求类型:refresh_token | string | Required |
| refresh_token | refresh_token值 | string | Required |
- Request Formats
application/json, text/json
{
"grant_type": "refresh_token",
"refresh_token": "73063d30a442443495f1abda03e86f8dcbdc1ffffe27409eb56d01e86bb5d755"
}
Response Information
- Resource Description
| Name | Description | Type | Additional information |
|---|---|---|---|
| access_token | access_token | string | None. |
| token_type | bearer | string | None. |
| expires_in | access_token过期时间(秒) | string | None. |
| refresh_token | refresh_token | string | None. |
| refresh_expires_in | refresh_token过期时间(秒) | string | None. |
| client_id | 客户端client_id | string | None. |
| resultMSG | 请求结果信息(成功/失败信息提示) | string | None. |
- Response Formats
application/json, text/json
{
"access_token": "o4ScKcJa9KaTuwqOMOpPA1OuTrVaIyBdkELUA1Py-MzOeQPT_5E8loqlaWFQa6bPuSsGe7bYthNDfBllh53g0_p99NZfornVwZOG8k9LYPUXRncENtnMz9NyF08-rQQp4z45N1sr_rr8nGyFdy9ZcQVbTHi8JNvpO-AnGM_QETR7arKPTLt7OUEwo7HyQKrPKa4cmsOeKYMRoDn5d_i5TGFpB-J2sBuKWiBxsl-L6GQ",
"token_type": "bearer",
"expires_in": "299",
"refresh_token": "524481df9d7644f09f4055554549a981cc3d5d00022e43729095650d53d20318",
"refresh_expires_in": "2592000",
"client_id": null,
"resultMSG": "The refresh request is successful"
}
本文介绍如何使用ASP.NET构建的RESTful API来刷新access_token。详细阐述了请求信息,包括请求URL(ntWebAPI/v1/oauth2/refTokenAsync),请求体参数格式(application/json, text/json)以及响应信息的资源描述和格式。"
119948175,8443328,C语言实现歌曲管理系统,"['C语言', '数据管理', '系统开发', '编程实践']

675

被折叠的 条评论
为什么被折叠?



