Skip to content

Instantly share code, notes, and snippets.

@anseljh
Created July 18, 2013 02:19
Show Gist options
  • Save anseljh/6026230 to your computer and use it in GitHub Desktop.
Save anseljh/6026230 to your computer and use it in GitHub Desktop.
Code from Dropbox's "Using the Core API in Python" that's not working
import dropbox as db
DB_APP_KEY = '...'
DB_APP_SECRET = '...'
DB_APP_NAME = '...'
DB_FOLDER_NAME = '...'
DB_ACCESS_TYPE = 'app_folder'
# Setup Dropbox session
sess = db.session.DropboxSession(DB_APP_KEY, DB_APP_SECRET, DB_ACCESS_TYPE)
print(sess)
# Request OAuth token and get user's permission
request_token = sess.obtain_request_token()
url = sess.build_authorize_url(request_token, oauth_callback=INSERT_CALLBACK_URL)
print("url:", url)
print("Please visit this website and press the 'Allow' button, then hit 'Enter' here.")
raw_input()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment