Discuss Dropbox Developer & API
I had integrated drop box in php and its file uploaded successfully, But there is issue of access token which available for short time. How to generate refresh token for it and integrate in php.
@Goldmine wrote:I had integrated drop box in php and its file uploaded successfully, But there is issue of access token which available for short time. How to generate refresh token for it ...
Hi @Goldmine,
All new access tokens are short lived (~4 hours typically). As you found out, refresh token can be used to achieve long term access. You can generate such token by hand using procedure like the one, described here. Checked and working. 😉
@Goldmine wrote:... and integrate in php.
You need to integrate in your php code only the last step, described there (i.e. the refresh step). You have to keep track for the expiration moment (calculated as refresh moment plus "expires_in" time), for every single access token, and when current time passes this expiration moment and you need to perform some API call, refresh the access token as described. It's easier instead of using access token as constant to implement accessor function and use it whenever you're using your token at present, so will be able track the needed refresh moment.
Hope this helps.
@Goldmine In addition to the information Здравко provided, you can find more resources on this at the following links:
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
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!