Dropbox Manual OAuth 2.0 Implementation

Hello,

I am in the process of trying to set up a manual OAuth 2.0 flow for Dropbox API, following the template guide here - https://forum.bubble.io/t/showcase-manual-oauth2-token-integration/79988

It’s a little different from the above example, since I am only using 1 Dropbox integration for all Users, but much of it seems the same.

So far, I have successfully initialized my get_token flow, as well as the API call I wish to use, list_folder. Below are screenshots of each:

The problem I’m struggling with is how to get the dynamically refreshed token into the Authorization header? In the example, they are passing the token through the POST Url, and so they can use the brackets for dynamic parameters, but how can I accomplish the same with getting the Bearer token in the Authorization header?

remove private checkbox. You will save the token and expiration date in your DB (related to the user probably) and populate it with the access token saved. You will also have a WF that will check before if the token is valid or expired with the date field. If expired, call the refresh token before, save in DB and continue

Ahh thank you, I see it gives the option for the dynamic header within the workflow view.

I have 2 backend API workflows, one for refreshing the token, and one for listing the contents of the folder… For the refresh token, I have a condition to only refresh if the current date is greater than access_token’s expiration date.

Does this seem like a good approach?



yes. Scheduling a backend flow a few min before the token expire to refresh it i fine.

1 Like