cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 

Authentication Error on iOS (Core API v1)

QOOQ New member | Level 1
New member | Level 1

There seems to be an authentication that might randomly happen the first time the app links to dropbox. (it happened in 2 out of 6 tries). However it seems to work correctly if the app is restarted.

The flow is, Link to dropbox, when successful and when the focus returns to my app, i try uploading a file, then I get the following error:

2015-10-16 19:29:50.499 appName[300:29495] [WARNING] DropboxSDK: error making request to /1/files_put/auto/Backup (2015-10-16 at 1929).zip - (401) Authentication failed

2015-10-16 19:29:50.499 appName[300:29495] File upload failed with error: Error Domain=dropbox.com Code=401 "(null)" UserInfo={sourcePath=/private/var/mobile/Containers/Data/Application/9357CDDE-0F42-4AE5-B5AD-7151BA370FC5/tmp/Backup (2015-10-16 at 1929).zip, destinationPath=/Backup (2015-10-16 at 1929).zip, error=Authentication failed}

2015-10-16 19:29:50.500 appName[300:29495] File upload failed with error (localized): The operation couldn’t be completed. (dropbox.com error 401.)

Also if i try requesting metadata i get this error:

2015-10-16 19:29:59.107 appName[300:29495] [WARNING] DropboxSDK: error making request to /1/metadata/auto - (400) invalid_request

2015-10-16 19:29:59.108 appName[300:29495] Error loading metadata: Error Domain=dropbox.com Code=400 "(null)" UserInfo={error_description=No auth function available for given request, path=/, error=invalid_request}

-------------------

However this is strange because it should ALREADY be linked, since i check it before performing the requests like this:

if (![[DBSession sharedSession] isLinked]) {
return;
}


By the way, i followed everything written on this guide: https://www.dropbox.com/developers-v1/core/start/ios

And as mentioned earlier, the weird thing is that, it might or might not happen the first time it is linked. So its kind of hard to replicate. Last time it happened, i closed the app, re-opened and it was suddenly fixed.

1 Reply 1

Re: Authentication Error on iOS (Core API v1)

Dropboxer
Dropboxer

[Moved to API Development forum]

Apologies for the delay! In the future, be sure to post any issues regarding the API in particular in the API Development forum.

Anyway, so we can help with this, please let us know:

- the version number of the SDK you're using

- the rest of the relevant code, e.g., where you create the session and client

- if the sample app included with the SDK reproduces the issue for you too

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?