Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hey,
I was wondering if it is possible to access a dropbox account without the token generated in the app console.
What I mean is, can I use an api on my python script that will query an input dropbox account (and password obviously) for files and then retrieve it?
As far as i've seen, I can only connect via the token to the account that generated it.
Thank you
Hey again.
I read through some API (python) and managed to create an app, generate my personal token and send file requests to dropbox.
That's nice, but I would like to be able to ask for username/password, instead of redirecting a user to the token page.
I found this example:
https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth.py
tl;dr
in the example it asks the user to:
print("1. Go to: " + authorize_url)
print("2. Click \"Allow\" (you might have to log in first).")
print("3. Copy the authorization code.")
Seems kind of silly, why can't i do it for the user with username/password?
I hope I made myself clear, I tried ![]()
OAuth 2 is an industry-standard protocol for authorization. Dropbox uses it to enable end-users to connect third party applications to their accounts without disclosing their credentials to the third parties.
I understand, so I cannot (and should not) ask the user for username/password and "do it myself" for the user.
I can open the link to the token generation, where the user will login and generate a code, which he would then pass to me, and revoke in case he wishes to cease the communication.
I got it right?
Yes, that's correct.
@vimalapalanisamy22 No, it is not possible to automate the app authorization flow. That will need to be processed manually once per user. The resulting access token and optional refresh token can be stored and re-used programmatically. Refer to the OAuth Guide and authorization documentation for more information.
@vimala_palanisamy22 You cannot get an access token for someone else's app without using the OAuth app authorization flow. If you need an access token for someone else's app to connect to your account, you will need to use the OAuth app authorization flow as documented. (The owner of an app can use the "Generate" button on the app's page on the App Console to create an access token for their own account for that app without using the actual OAuth app authorization flow, but that is only available to the owner of the app in particular.)
@vimala_palanisamy22 Connecting an app to a team works the same way as connecting an app to a user account. You would use the OAuth app authorization flow (or the app owner can use the "Generate" button if they just need a short-lived access token), but the developer would enable the relevant "team" scope(s) first.
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!