cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

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

How to use username and password for upload files from web application using DropBox api

Explorer | Level 3

Hello,
     How to use username and password for upload files from web application using DropBox api instead of using access token,App key and App secret.

Pls reply asap

Regards,
Aravind

5 Replies 5
Highlighted

Re: How to use username and password for upload files from web application using DropBox api

Dropboxer
Dropboxer

The Dropbox API does not support uploading using the username and password. 

Your app should implement the OAuth flow so that each user can choose to connect their Dropbox account to your app. This way, your users don't need to register their own apps, and your app never handles their usernames/passwords. You can find information on how the OAuth flow works here:

https://www.dropbox.com/developers/reference/oauth-guide

You can find the documentation for it here:

https://www.dropbox.com/developers/documentation/http/documentation#authorization 

Once your app has an access token for a user, it can use it to upload files, e.g., using /2/files/upload:

https://www.dropbox.com/developers/documentation/http/documentation#files-upload

Those are links to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible:

https://www.dropbox.com/developers/documentation

Those have corresponding native methods for the HTTPS endpoints. They also do most of the work of implementing the OAuth flow for you.

Highlighted

Re: How to use username and password for upload files from web application using DropBox api

Explorer | Level 3

Hi , Thanks for reply, 
    I want some more explanitaion, i have 1000 more user, each user have their own dropbox account, 
  I have web application in that each user enter their username and password of dropbox and in file broser button , they browse file and click upload.
 Once submit file insert into their own dropbox which what dropbox username and password they typed.

For this how i get each user access tokes or app ID or screate key, we know only username and password only, but i can upload file using access token.

If only upload file with access token, then how to get access token using username and password ? or how to get api key and screat key using username and password

so how this will do in web application,
 interface screenshot :http://prntscr.com/l4b4w0

Regards,
Aravind

Highlighted

Re: How to use username and password for upload files from web application using DropBox api

Dropboxer
Dropboxer

Users should not be entering their Dropbox username and password into your app, and your app should never prompt them to do so.

Your app must implement the OAuth app authorization flow so that it can get an access token for each user, without ever seeing their Dropbox username and password. The app can use the resulting access token to make API calls, e.g., to upload files, etc.

Please refer to the OAuth guide and documentation for more information on how to do this. We also recommend using one of the official SDKs, if possible, as they will handle most of the work for you.

There's a basic example of this flow implemented in the API v2 Explorer demo, for instance.

Highlighted

Re: How to use username and password for upload files from web application using DropBox api

New member | Level 2
New member | Level 2

Hi.

How can i get an oauth2 token in c# to call the new DropBoxClient with the token?

Thanks!

Highlighted

Re: How to use username and password for upload files from web application using DropBox api

Dropboxer
Dropboxer

@Testman It sounds like you're referring to using the official Dropbox API v2 .NET SDK. You can find information on how to implement the OAuth 2 app authorization flow to get an access token using that here:

https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxOAuth2Helper.htm

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Need more support?