You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Keith B.7
9 years agoHelpful | Level 7
How to re-link a user in API 2 (Handling Revoked Access Etc)
In API 1, I could offer the user an option to re-link (re-authorise) Dropbox if they run into issues because their access token had expired or been revoked. I could do this as follows: First, I l...
- 9 years ago
That's right. There's a simple example here, but you may want to handle the more specific cases (e.g., invalid access token versus suspended user) in the DBAUTHAuthError.
Greg-DB
Dropbox Staff
That's right, reauthorizeClient isn't for this case. That's meant for when you want to retrieve an authorized client for a user account for which you already have an access token.
For the revoked access token case, you can just catch the authorization failure (the InvalidAccessToken DBAUTHAuthError from DBRequestAuthError) and then call authorizeFromController again to have the user re-link and get a new access token.
Keith B.7
9 years agoHelpful | Level 7
Great, thanks for the clarification. So, instead of an equivalent of DBSession's -sessionDidReceiveAuthorizationFailure: delegate method, I check for DBError's -isAuthFailure in the response of any of the Dropbox requests? That makes sense, thanks!
- Greg-DB9 years agoDropbox Staff
That's right. There's a simple example here, but you may want to handle the more specific cases (e.g., invalid access token versus suspended user) in the DBAUTHAuthError.
- Keith B.79 years agoHelpful | Level 7
Great, thanks. Following your advice, I've got checking for revoked access and re-linking all working - much appreciated!
All the best,
Keith
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,888 PostsLatest Activity: 2 days agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!