最近需要访问 OneDrive, Box & Dropbox 上的文件。
研究了一下,前面两个,都有 token & refresh token,token 都是很快(比如 1 小时)过期,然后用 refresh token 去取新的 token。refresh token 也是 3 个月或者 6 个月过期。
但是 Dropbox 好像没有。翻 API 在线文档,如下:( https://www.dropbox.com/developers/support )
Do API access tokens expire?
App access tokens effectively don't expire, but users can manually revoke tokens by going into My apps. In the case of apps with app folder access, if the user deletes the app folder, your app's access token will no longer be valid.
You should only process the authorization once, and save the access token for all future calls for that user. If an existing access token is invalid, (in which cases calls will return 401), you should prompt the user to re-authorize your app.
这样的话,那不是使用 Dropbox 的 API,很不安全?需要 client app 自己去处理 token 的问题?
不是很理解,请教一下大家。谢谢