沙与沫 · 提问于2021.06.03浏览量:3307官方地址:https://pan.baidu.com/union
接入地址:https://pan.baidu.com/union/document/entrance#%E7%AE%80%E4%BB%8B
首先需要申请介入,然后创建应用,然后就可以获取到所需要的信息了;

1. 用户进行授权
http://openapi.baidu.com/oauth/2.0/authorize?response_type=code&client_id=【你的AppKey】&redirect_uri=oob&scope=basic,netdisk&display=tv&qrcode=1&force_login=1
示例:http://openapi.baidu.com/oauth/2.0/authorize?response_type=code&client_id=pFi5MK00QMowVsARS0vq6uUl6pHI40vp&redirect_uri=oob&scope=basic,netdisk&display=tv&qrcode=1&force_login=1
需要扫码获取授权码


目前有的信息:
appId:24092476授权码为:410db528d5616bfb3a370a4617a7933dAppKey:pFi5MK00QMowVsARS0vq6uUl6pHI40vpSecretKey:uQEpffGjBo23OYFC10yx96EY0D4HE1dsSignKey:g9i5523T-Sfh7@6wmzFIwaT4fbA+MPdV
2、根据授权码获取token
https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=【授权码】&client_id=【appkey】&client_secret=【SecretKey】&redirect_uri=oob示例https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=410db528d5616bfb3a370a4617a7933d&client_id=pFi5MK00QMowVsARS0vq6uUl6pHI40vp&client_secret=uQEpffGjBo23OYFC10yx96EY0D4HE1ds&redirect_uri=oob

3、刷新token
https://openapi.baidu.com/oauth/2.0/token?grant_type=refresh_token&refresh_token=122.2641a48e82355223fd52a9e33a1d4c0a.YH7pfkQ1Zfk3DLOoe9-NQg5GhgwaR2exRGaIgWp.ADqRPQ&client_id=【appkey】&client_secret=【SecretKey】示例https://openapi.baidu.com/oauth/2.0/token?grant_type=refresh_token&refresh_token=122.2641a48e82355223fd52a9e33a1d4c0a.YH7pfkQ1Zfk3DLOoe9-NQg5GhgwaR2exRGaIgWp.ADqRPQ&client_id=pFi5MK00QMowVsARS0vq6uUl6pHI40vp&client_secret=uQEpffGjBo23OYFC10yx96EY0D4HE1ds

http://openapi.baidu.com/oauth/2.0/authorize?response_type=token&client_id=pFi5MK00QMowVsARS0vq6uUl6pHI40vp&redirect_uri=oob&scope=basic,netdisk&display=popup&state=xxx


先收藏后用!

为什么我请求刷新TOKEN的时候出现 refresh token has been used。
如果再次请求的话,就出现命中安全规则。
相关问题