Forum Discussion

Arpit A.'s avatar
Arpit A.
New member | Level 1
11 years ago

How does updateAccessToken work?

When a user unlinks an application the sessionDidReceiveAuthFailure delegate method is invoked, however the error message says : Access token not valid. Definitely it makes sense, but how should I differentiate if the token expired because of the application which was unlinked or because the token expired?

Reason:
for the former, the user would have to go to dropbox to reauthenticate the application, however the an expired token because of time can be fixed silently using updateAccessToken. (please correct me if I'm wrong). Thanks.

4 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    The updateAccessToken method doesn't allow you to fix expired access tokens, and access tokens don't actually expire anyway. So, in any case you get sessionDidReceiveAuthFailure you should prompt the user to re-link the app to their account if they want to continue using the app.

  • Arpit A.'s avatar
    Arpit A.
    New member | Level 1
    11 years ago

    Thanks! helps a ton!
    however re-linking would always require the user to jump off too Dropbox app or re-login via web. (A yes/no would suffice).

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    Yes, the user would need to re-link the app the same as the first time, i.e., it would be done via the official app or web.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If 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, Facebook or Instagram.

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!