Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Daniel J.18
11 years agoNew member | Level 1
Access Token Changes Every time I use it
Hi,
I'm working on a DIY motion detection project with a raspberry pi and I was able to save image files to my dropbox by using the generated access token (which is ridiculously long btw). My issue...
Daniel J.18
11 years agoNew member | Level 1
Originally I was using this code to upload to my dropbox folder...
---------------
from dropbox.client import DropboxOAuth2FlowNoRedirect
from dropbox.client import DropboxClient
if conf["use_dropbox"]:
# connect to dropbox and start the session authorization process
flow = DropboxOAuth2FlowNoRedirect(conf["dropbox_key"], conf["dropbox_secret"])
print "[INFO] Authorize this application: {}".format(flow.start())
authCode = raw_input("Enter auth code here: ").strip()
# finish the authorization and grab the Dropbox client
(accessToken, userID) = flow.finish(authCode)
client = DropboxClient(accessToken)
print "[SUCCESS] dropbox account linked"
---------------
With this, every time I ran the code, It would ask me to enter the dropbox link into my URL, enter my dropbox email and password, and then it would give me the access token.
I tried replacing the lines asking for the token with the token hard coded in...
print "[INFO] Authorize this application: {}".format(flow.start())
authCode = raw_input("Enter auth code here: ").strip()
with
authCode = ("ACCESS_TOKEN_HERE")
This worked once but then fails when I try to run the program again and I need to get another token.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!