You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

shivam_dev's avatar
shivam_dev
New member | Level 2
7 months ago

Is there any way to refresh or get new access token without any URI

I am building a music web application, in which audio files are getting retrieved from DropBox.

But due to expiration of access token after some time, I have again and again enter new access token inside the code, due to which I won't be able to deploy my app.

 

I have tried URI method to get new access_token, but i want to make it automatic with URL method i.e not asking for permission for allow/deny on an interface.

 

Please suggest me some alternatives

  • Здравко's avatar
    Здравко
    Legendary | Level 20

    shivam_dev wrote:

    ...

    But due to expiration of access token after some time, I have again and again enter new access token inside the code, due to which I won't be able to deploy my app.

    ... i.e not asking for permission for allow/deny on an interface.

    ...


    Hi shivam_dev,

    Did you try usage of refresh token? 🧐 It doesn't expire and you may get new access token using refresh token whenever previous one expire and you need new valid one without further user interaction (on background) - exactly what you asked for. 😉

    Take a look here for possible workflow. You have to perform by hand (including interaction and giving access permission) the first part once and since then the last (refresh) part repeatedly further fully automatic whenever needed. If you use some of the official Dropbox SDKs, the last part is implemented there and the only thing you need is proper client object initialization and then use the same way as you're using now. When you have your own API code (without SDK) you have to implement that refresh step there youself.

    Hope this gives direction.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,887 PostsLatest Activity: 2 hours ago
326 Following

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 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!