Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.

Forum Discussion

GreenbackBoogie's avatar
GreenbackBoogie
Explorer | Level 4
8 years ago
Solved

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
    8 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.

4 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago
    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
    8 years ago
    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 Community Moderator rankDropbox Community Moderator
    8 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.

About Dropbox API Support & Feedback

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

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