二. 刷新access_token

本文介绍如何使用ASP.NET构建的RESTful API来刷新access_token。详细阐述了请求信息,包括请求URL(ntWebAPI/v1/oauth2/refTokenAsync),请求体参数格式(application/json, text/json)以及响应信息的资源描述和格式。" 119948175,8443328,C语言实现歌曲管理系统,"['C语言', '数据管理', '系统开发', '编程实践']

通过API方式,刷新access_token

url: ntWebAPI/v1/oauth2/refTokenAsync

Request Information

  • Body Parameters
NameDescriptionTypeAdditional information
grant_type请求类型:refresh_tokenstringRequired
refresh_tokenrefresh_token值stringRequired
  • Request Formats

application/json, text/json

{
  "grant_type": "refresh_token",
  "refresh_token": "73063d30a442443495f1abda03e86f8dcbdc1ffffe27409eb56d01e86bb5d755"
}

Response Information

  • Resource Description
NameDescriptionTypeAdditional information
access_tokenaccess_tokenstringNone.
token_typebearerstringNone.
expires_inaccess_token过期时间(秒)stringNone.
refresh_tokenrefresh_tokenstringNone.
refresh_expires_inrefresh_token过期时间(秒)stringNone.
client_id客户端client_idstringNone.
resultMSG请求结果信息(成功/失败信息提示)stringNone.
  • 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"

}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值