Dropbox API令牌格式 [英] Dropbox API Token format
问题描述
我正在使用Dropbox API将生成的PDF文档准备就绪后直接(缓慢)直接弹出到用户的Dropbox中.为此,我的应用程序要求用户提供其Dropbox Apps文件夹API令牌,然后按照
I am using the Dropbox API to pop (slowly) generated PDF documents directly into the user's Dropbox when they are ready. To that end my application asks users to provide their Dropbox Apps folder API token and then use it to upload the PDFs as discussed in a previous thread.
到目前为止没有问题.我想做的就是让他们提供的令牌"经过一些基本的身份验证,以确保它确实是Dropbox令牌.在这个问题上,我还没有从Dropbox获得任何帮助.
No issues thus far. What I would like to be able to do is to subject the "token" they provide to some basic authentication to ensure that it is indeed a Dropbox token. I haven't been able to get any help from Dropbox on this subject.
- 这种令牌是否有已知格式?
- 它们是否带有可用于验证它们的某种形式的校验和?
我将竭尽所能帮助任何对此有帮助的人.
I'd be most obliged to anyone who might be able to help with this.
推荐答案
- 否,Dropbox API不能对这样的访问令牌的确切格式做任何保证.
- 不,没有校验和可用于验证它们.
请注意,访问令牌仍然可以远程吊销,因此检查访问令牌是否真正有效的唯一方法是尝试对其进行API调用(例如,大多数开发人员都使用帐户信息调用,因为没有任何副作用)以检查它是否成功.
Note that access tokens can be revoked remotely anyway, so the only way to check if an access token is actually valid is to attempt an API call with it (e.g., most developers use the account information call, since there aren't any side effects) to check if it succeeds or fails.
这篇关于Dropbox API令牌格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!