Learn how to make the most out of the Dropbox Community here 💙. 

Forum Discussion

Amicao's avatar
Amicao
Explorer | Level 3
3 years ago
Solved

How to use Dropbox as server side Laravel Filesystem continuously?

Hello, good evening, my name is Victor, I'm currently on behalf of a customer to solve a doubt. I need to make a Laravel application for him that uses Dropbox as its Filesystem for file storage. Currently I have implemented this project schema with the spatie/flysystem-dropbox dependency like this https://github.com/VictorRayan/laravel-dropbox/. With this, the application is already able to perform file management operations on Dropbox, however, it uses the Access Token that expires periodically, as it is a server application, it is not feasible to have to manually update the temporary token all the time.

So the solution that I imagine I've read in the documentation would be to use the Dropbox app's ID and Secret to generate a refresh token request and periodically obtain, in an automated way, new expired access tokens to continue using in this already implemented system.

My problem is that I read and read a lot of the documentation about HTTP and OAuth flow and for me still its implementation and functioning is however obscure, I can't understand. I would be very grateful if you could help me with some example according to what I need.

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

    Hi Amicao,

    You can get idea how it works here, I believe. 😉 Your work is the PHP "translation".

    Hope this helps.

    • Amicao's avatar
      Amicao
      Explorer | Level 3

      Thank you very so much! Now it's clarified to me, I understood well how it works.

      Really, this will be just the PHP translation haha