cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We're looking to hear about your experience when using Dropbox in a web browser. What parts of Dropbox feels very slow to you and takes a lot of time to get done? What are you trying to do in the Dropbox web browser when you experience slowness? Tell us right 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: 
1
Ask
2
Reply and help

How can I retrieve refresh token automatically in Python API for long lasting app?

How can I retrieve refresh token automatically in Python API for long lasting app?

Sufiyanashraf
Explorer | Level 3

I am trying to build an app that automatically updates files every minute from my server PC to dropbox API using the python app. But after 4 hours, it gives an expired token error. what I do is go to the token URL and click on allow button, copying refresh token, and use this in my code to get access token and work using it and to implement if condition to check if the response shows an error of expired token then again requests a new access token using refresh token that received in the previous response. Here is my code in Github. Please check if there is any mistake.

 

Solved! Was doing a little mistake!

1 Reply 1

Re: How can I retrieve refresh token automatically in Python API for long lasting app?

Greg-DB
Dropboxer

Thanks for following up. I'm glad to hear you got that solved.

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?