cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Access without an "app"

Access without an "app"

mbm123
Explorer | Level 4
Go to solution

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

19 Replies 19

mbm123
Explorer | Level 4
Go to solution

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 :slightly_smiling_face:

 

Greg-DB
Dropbox Staff
Go to solution

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.

mbm123
Explorer | Level 4
Go to solution

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?

Greg-DB
Dropbox Staff
Go to solution

Yes, that's correct.

vimalapalanisamy22
New member | Level 2
Go to solution
Currently we are using few Dropbox api method. We are using Authorization flow in which response code ,scope ,client id passed.this will give me Authorization code and i need to pass them to token api which will return access token. Is there any way to automate this process- exchanging Authorization code for access token. Or Dropbox can use api for Authorization flow for instead of this website.

Greg-DB
Dropbox Staff
Go to solution

@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
Explorer | Level 3
Go to solution
Let's say ,I am team admin in my team there are 3 members-not admin role are there ..all of them are creating full Dropbox apps. I have added them in the settings->app permission ->other apps..now as a team admin how can I generate a token for the apps that was created by other members without using Authorization flow.

Greg-DB
Dropbox Staff
Go to solution

@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
Explorer | Level 3
Go to solution
I have doubt like , i am team admin, I don't have created business app or neither my team members. In such case how can we create access token for calling APIs with team authentication

Greg-DB
Dropbox Staff
Go to solution

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

Need more support?