Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

thedeck's avatar
thedeck
Helpful | Level 6
9 years ago
Solved

OAuth2 token with iOS SDK

Hello,   I'm currently migrating one of my iOS app to the V2 of the API. When a user authorize my app to use its Dropbox account I want to retrieve the OAuth2 token to share it with my server...
  • Greg-DB's avatar
    9 years ago

    Hi, it sounds like you're using the official API v2 Objective-C SDK. Is that correct? If so, the SDK handles the access token retrieval and storage for you, regardless of which flow exactly was used (e.g., via app or web). If you're using that SDK, you should just implement the authorization flow as documented here.

     

    That will automatically store the token, and you can then retrieve the client via DBClientsManager authorizedClient. That is, you don't need to check the URL parameters yourself.

     

    If you then do want to retrieve the access token(s) themselves, you can use DBOAuthManager.getAccessToken or DBOAuthManager.getAllAccessTokens.

  • thedeck's avatar
    thedeck
    9 years ago

    Thanks, that works perfectly!

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!