Change API calls for Live and development

Hello,

I have a bubble App which needs to call a different API in live mode.

How would one differ between live and development versions.

I found that I can ‘test’ in workflows for ‘is development version’. But that would mean I need to duplicate all related workflows and build the api calls for live.

Is there a more ‘easy’ solution , like env variables ?

First;

You can duplicate a whole API Connector “API” (you can also dupe a call.) Right click on thecthing and you’ll see the options.

Second: Your “Live” api can be called in dev mode. The point of this is external APIs will sometimes have a test environment where ur supposed to do your development. Then, upon review you get access to production.

But of course, you can at that point (when you have access to production) just call the production API whenever you want. So, you CAN (if you want) just say “Eff it. I’m done with your training wheels environment.”

At that point, copying the API is just to have something as a backup (the dev/test version of the calls). It’s such a PIA to change your call URLs and such that this is very tempting when using Bubble. And I wouldn’t really dissuade you from that.

1 Like

Hey Keith, Many thanks for your suggestions.

In my case I have a API for the development environment and a different one for the production environment. I can/will never call the ‘production API’ in the ‘development environment’.

For now I will copy workflows and switch based on ‘is dev version’.

I would love to have %API_URL% all over the bubble environment :wink:

2 Likes

Please see my last tip if it solves this issue: Handle with 'dev' and 'live' environments using 'API connector' calls

1 Like

Right click and you see duplicate… :exploding_head: :exploding_head: