Created
July 18, 2013 02:19
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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