cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know more about how you can find anything and protect everything? Check it 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: 

authorize url

authorize url

shashikiran
New member | Level 2

is it possible to get access token without these steps

System.out.println("1. Go to: " + authorizeUrl);

System.out.println("2. Click \"Allow\" (you might have to log in first)");

System.out.println("3. Copy the authorization code.");

in java

1 Reply 1

Greg-DB
Dropbox Staff

If you only need a short-lived access token for your own account, you can use the "Generate" button on the app's page on the App Console.

 

Otherwise, no, it's not possible to bypass the authorization page step of the app authorization flow. This needs to be done manually by the user at least once. If your app needs to maintain long-term access without the user manually re-authorizing it repeatedly, the app should request "offline" access so that it gets a refresh token. The refresh token doesn't expire and can be stored and used repeatedly to get new short-lived access tokens whenever needed, without the user manually reauthorizing the app.

 

You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example.

 

The official Dropbox Java SDK can actually handle the refresh process for you automatically, as long as you supply the necessary credentials, e.g., as shown retrieved in the examples here.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?