Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

Mitchel K.1's avatar
Mitchel K.1
New member | Level 1
10 years ago

Using generated access token with the iOS sdk

Hello

I'm trying out the iOS sdk using a generated access token but I keep getting an "Access token not found" error even though the token works fine in android.

Here is my case (swift):

let dropboxSession = DBSession(appKey: DB_KEY, appSecret: DB_SECRET, root: kDBRootAppFolder)
dropboxSession.updateAccessToken(DB_ACCESS_TOKEN, accessTokenSecret: DB_ACCESS_TOKEN_SECRET, forUserId: DB_USER_ID)
DBSession.setSharedSession(dropboxSession)

So I'd appreciate to know what "DB_ACCESS_TOKEN_SECRET" should be since the generated token is a single string?

2 Replies

Replies have been turned off for this discussion
  • The Dropbox API supports both OAuth 1 and OAuth 2. The generated access token is a OAuth 2 token, but the SDK you're using only supports OAuth 1. OAuth 1 tokens are different and have two components: a token and a token secret. You won't be able to use a generated access token with the iOS Core SDK.

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!