Discuss Dropbox Developer & API
In my app, I am using the OAuth properly and am able to interact with a user's file (read, write etc). My flow is currently:
1. Get access_token by having the user allow the app access to their account and calling this endpoint
https://api.dropbox.com/oauth2/token
2. Have user select files from the Chooser
3. Use the access_token and file information to perform the necessary operations
However, now there is a requirement to support multiple dropbox accounts per user. I can once again use the token endpoint to get the access_token for each account, but I am lost on how to get the account ID when the user interacts with the chooser so I can relate each file with the proper access_token. Is there an endpoint or option on the chooser to get the account ID on what the logged in account is when the user opens the Chooser?
No, I'm afraid there isn't anything quite like that either. (The Chooser wasn't originally designed to be used together with the API, so there isn't much interoperability.)
There are a few ways you can try, though they're not ideal and won't be 100% reliable for this:
No, unfortunately there isn't a way to get the account ID from the Chooser like this, but I'll pass this along as a feature request. I'm not currently aware of any plans to implement this though.
Ah shucks 😞
Per chance, is there any way to get the user info from the file info? For example, maybe get the account ID from the file ID or file link from another API endpoint?
No, I'm afraid there isn't anything quite like that either. (The Chooser wasn't originally designed to be used together with the API, so there isn't much interoperability.)
There are a few ways you can try, though they're not ideal and won't be 100% reliable for this:
Gotcha, I was thinking of doing something along those lines. Thanks Greg
Hi there!
If you need more help you can view your support options (expected response time for a 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!