Forum Discussion

nitinmaheshwari's avatar
nitinmaheshwari
Explorer | Level 3
8 years ago

Create folder, Delete and upload APIs in Dropbox iOS SDK gives DBRequestErrorRateLimit error

When I try to upload more than 50 folder and 50 files to dropbox using Dropbox iOS SDK. I frequently get error DBRequestErrorRateLimit, even after retrying failed request after 1 second as suggested in Dropbox documentation, it fails again. Then I retry it again more than 5 times but again it gives DBRequestErrorRateLimit error.

I don't know how to handle it now as deleting more than 20 files in one go(20 delete API requests) also gives same error.

Please let me know how handle such situation? My folder and file count could be is more than 200 than I have to retry the API call for many number of times, this will increase the time to copy files to Dropbox and hence the user experience might not be good.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    If you check the DBAUTHRateLimitReason, is it isTooManyWriteOperations? That indicates that it's not explicit rate limit, but rather a technical inability to make multiple modifications in an account at the same time. Note that the simultaneous changes can be from either the app itself, or other clients acting on the account. (E.g., the official Dropbox desktop client, another API app, a Dropbox mobile app, etc.)

     

    If it is coming from your own app, you'll just need to avoid making multiple simultaneous modifications like this.

     

    There also some optimizations you can make. For instance, use the batch versions of methods, when available, such as deleteBatch and uploadSessionFinishBatch.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 2 days ago
351 Following

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 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!