You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

GreenbackBoogie's avatar
GreenbackBoogie
Explorer | Level 4
7 years ago

Dynamically create apps

Hi!

 

I'm designing an app, where users would potentially make a lot of queries to the Dropbox API (it will make use of very active file-sharing). And this amount of requests by all the users will obviously hit the rate limiting for a single Dropbox app. But it will be fine for a single user though.

 

So I came up with the idea of creating a Dropbox app per user of my app (so each user would work with Dropbox API through their own token).

 

My question is: is there a way of creating API apps (to obtain API tokens) automatically? So each new user of my app will obtain his own Dropbox token (under the hood).

 

Thanks in advance.

  • Greg-DB's avatar
    Greg-DB
    7 years ago
    I see, thanks for clarifying. The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account. The SDKs don't offer explicit support for it and we don't recommend doing so, for various technical and security reasons.

    However if you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your account and app. (Just be careful not to revoke it, e.g. via https://www.dropbox.com/account/connected_apps .)

    Of course, you would be more likely to hit the rate limits. I'll send this along as a feature request for a better way to handle this, or a way to programmatically register API apps, but I'm not aware of any plans to add those right now.
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    Dropbox doesn't offer a way to automatically create API apps.

    The Dropbox API rate limiting system does work per-app-user though, so using a single app should be fine anyway.
    • GreenbackBoogie's avatar
      GreenbackBoogie
      Explorer | Level 4
      Hi, Greg. Yes, it works per-app-user - if a user is authorizing the app. But if the only authorized user is me and I use my own user-token on the back-end (so my app is kind of a "proxy" or "gateway" between end-users and Dropbox), then all the requests will be performed against a single token (mine).
      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        I see, thanks for clarifying. The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account. The SDKs don't offer explicit support for it and we don't recommend doing so, for various technical and security reasons.

        However if you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your account and app. (Just be careful not to revoke it, e.g. via https://www.dropbox.com/account/connected_apps .)

        Of course, you would be more likely to hit the rate limits. I'll send this along as a feature request for a better way to handle this, or a way to programmatically register API apps, but I'm not aware of any plans to add those right now.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,888 PostsLatest Activity: 2 days ago
326 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!