Forum Academy Marketplace Showcase Pricing Features

HELP! Is it possible to make an API call work on both dev and live?

I have an API that is currently set to work with my development endpoint, but I want this to work on both live and dev but use the appropriate database. I wondered if the [] param option could be used to either ADD /version-test/ or REMOVE it if the API call is from the live version.

Anyone have ideas?

2 Likes

Following this because I’d like to know also what the best way to do this was. I tried this checkbox but I didn’t think it made any difference but didn’t dig too deep.

https://manual.bubble.io/core-resources/bubble-made-plugins/bubble-app-connector#match-versions-live-vs-dev

1 Like

Hey @eLPDev :wave:

I’m not sure what you have setup already. It really depends on how it’s set up. If what @lindsay_knowcode says doesn’t work. Maybe try this:

What I have done is put it in like this /version-[VERSION]>

Then for VERSION I would put pass along app version. This would show either test or live. Depending on your version of course.

Does that make sense?

Hope that helps! :blush:

@j805 www.NoCodeMinute.com

For All Your No-Code Education Needs:

Hey, @J805! Thanks for the reply. I’m thinking that sounds like what I’m wanting! Just trying to picture it.

Do you have any pics you can share on the API config side?

1 Like

I don’t have an example set up. Can you share a screenshot of yours and I can mark it up to what it should be? :blush:

@J805, certainly! Here’s a sample call:

I’d want this to be dynamic, so I can securely run it on the live endpoint when the app is live and test when test.

Hey @eLPDev :wave:

Thanks for the screenshot! Are you calling your own API from your Bubble app? Or what is this API connecting to?

Let me know, then maybe I can try to help more and get you on the right path. :blush:

I am indeed! This is just an API endpoint I call from my Bubble app. Currently, I’m on Hobby, so it is a public call but is authenticated.

@eLPDev

Ok, sounds good. I would have never thought to do it that way. I am not sure if backend workflows even work on the hobby plans. Anyways, I think your URL will be something like this.

Example: https://YOURDOMAIN/version-[appVersion]/api/1.1/wf/call_email

Then the parameter will show up below.

appVersion = test

Then in your workflow you would put App version for that parameter.

Does that make sense?

Hope that helps! :blush:

1 Like