Generate an access token for your own account

When developers first start to use the Dropbox API, they often want to experiment with their own account before worrying about the complexities of authenticating other users. To make this easier, we recently added the ability to generate an OAuth 2 access token for your account with the click of a button.

The new button can be found on the App Console for any Dropbox API app:


Once you click that button, you’ll see an OAuth 2 access token that you can use to make calls to the Dropbox API. For example, here’s a curl command to fetch the account info for your account:

curl -H "Authorization:Bearer <YOUR-ACCESS-TOKEN>"

Here’s similar code in Ruby:

require 'dropbox_sdk'
client ="<YOUR-ACCESS-TOKEN>")
puts client.account_info()["display_name"]

Note that the generated access token only works for your own Dropbox account. Once you deploy your app to other users, you’ll need to use the standard OAuth authorization flow to acquire tokens for each user.