首页 > 解决方案 > 保管箱中的令牌到期问题

问题描述

我尝试了这段代码来获取访问令牌,因为它给了我这个错误。

curl https://api.dropbox.com/oauth2/token \
    -d grant_type=refresh_token \
    -d refresh_token=<REFRESH_TOKEN> \
    -u <APP_KEY>:<APP_SECRET>

收到此错误

Client error: `POST https://api.dropbox.com/oauth2/token` resulted in a `400 Bad Request` response: {"error_description": "refresh token is malformed", "error": "invalid_grant"}

代码将在一段时间后过期,所以我必须从 Dropbox 网站手动放置令牌

https://www.dropbox.com/developers/documentation/http/documentation

令牌是这样的

sl.A5gzYO9XTUXHhxYB0qLnP-Ycp9nDP4w1Jwr0g5p-DdsfSD,MFN4KBk6i1DCgeoN13zd2-BG6XwO_TQO95_N9e84ZD_C7uSNcp--GHrDmLqIfFVRsvNPRNFqL9HiVeBhm_C

标签: phplaravelapidropbox

解决方案


推荐阅读