cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you an educator? Well we want to hear from you, so check out some tools we think might help you out 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: 

Authenticate using username/password in java

Authenticate using username/password in java

lovin a.
New member | Level 1

can anybody tell me how to authenticate via dropbox username password in my desktop application.

7 Replies 7

Re: Authenticate using username/password in java

Richard P.
Super User alumni

You can't - you have to use the OAuth authentication flow, you cannot authenticate using a username and password.

Re: Authenticate using username/password in java

lovin a.
New member | Level 1

Does this mean, every user who want to access dropbox files, need to create an dropbox app and generate consumer key and secret?

Re: Authenticate using username/password in java

Richard P.
Super User alumni

No, users just have to authenticate using the OAuth process flow - the application will have your keys and secrets embedded in it, they don't have to generate their own.

Re: Authenticate using username/password in java

lovin a.
New member | Level 1

thanks for prompt response...
yes we can keep key. secret inside application. so which OAUTH flow we can use so that for new user we can get access token...i cant find grantType password working in dropbox which is way to pass username/password

Re: Authenticate using username/password in java

lovin a.
New member | Level 1

i dnt want to use 3legged oauth flow..

Re: Authenticate using username/password in java

Richard P.
Super User alumni

As I said before, you can't have your users present their Dropbox username and password to your application - that is not allowed.

You have to use the authentication flow detailed here:

https://www.dropbox.com/developers/core/start/java

This flow connects to the Dropbox servers using a browser instance, allows the user to authenticate directly with the Dropbox servers, and gives you an authentication token at the end of it. It is that authentication token that you then use to access Dropbox on behalf of that user.

Re: Authenticate using username/password in java

lovin a.
New member | Level 1

ohh this is 3legged flow...
Dropbox dnt support "4.3 Resource Owner Password Credentials Grant" ??
Oauth2 specs: https://tools.ietf.org/html/rfc6749#section-1.3.3
POST /token HTTP/1.1
Host: server.example.com
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
Content-Type: application/x-www-form-urlencoded

 grant_type=password&username=johndoe&password=A3ddj3w
Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    lovin a. New member | Level 1
  • User avatar
    Richard P. Super User alumni
What do Dropbox user levels mean?
Need more support?