Dynamic value for OAuth2 authentication in API Connector

I will say that it’s depend.

Firs thing to consider is Bubble already do requests server side (except if you enable try to run this request in the browser. This shouldn’t be available in your case anyway).

So when you are doing the token request, everything remain safe. The only thing that someone could see by inspecting the “doapicall” stuff, is the “version” that you will send according to live VS dev. But client and secret key are safe.

Do you need to add a step? It’s depend. Because you can use the token call as “data” instead of action, you can just add it directly to get call (let’s say you have a call that fetch a list of items, this call will have Authorization: Bearer (Get data from API = token request). So you don’t need to add another step.

If you don’t need to send the token call to the backend WF (because Bubble process it server side anyway)… this is not exactly the same thing for the other requests. Yes they are done on server side too… but if you inspect the doapicall generated by Bubble, you will see the access token from the Get Data from API (token) request. If the token is never refreshed and have a long lifetime… it’s better to do it with a backend WF. But if the token is refreshed at each request… I don’t see a problem to not use a backend WF (however, it will be more secure to do it backend for sure).

I’m happy to read this because I’Ve requested this already 3 times this years. More user will add this request, more chance we have to see this happen.

Hi Jici,

Thanks for your feedback. I liked the idea of getting the token through a call as a parameter in the API request. I hadn’t thought of that.

However, I can’t use this solution because I’m using AWS Cognito to secure the API. If Bubble managed OAuth2 properly, it would mean requesting a token every hour, costing around $2 per month. But if each API call requires a new token, the costs become prohibitive. For example, with 1,000 users making 100 API calls per month, the cost would be approximately $225 per month. This cost scales with the user base.

By the way, I haven’t received any meaningful response from support regarding this issue. I received six emails saying someone would look into it and one email with unhelpful information. I’m continuing to follow up and will keep you posted.