# How to support both dev and production version of bubble webhook?

**URL:** <https://forum.bubble.io/t/how-to-support-both-dev-and-production-version-of-bubble-webhook/213322>\
**Category:** APIs\
**Created:** [June 29, 2022, 3:24am UTC](https://forum.bubble.io/t/how-to-support-both-dev-and-production-version-of-bubble-webhook/213322 "2022-06-29T03:24:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![whycu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/whycu/32/137799_2.png) [@whycu](https://forum.bubble.io/u/whycu)\
**Post date:** [June 29, 2022, 3:24am UTC](https://forum.bubble.io/t/how-to-support-both-dev-and-production-version-of-bubble-webhook/213322/1 "2022-06-29T03:24:16Z")

</div>

I have a backend API that sends callback update to Bubble API. The bubble interface gave me the following call back url to use: [https://yourdomain.com/version-test/api/1.1/wf](https://yourdomain.com/version-test/api/1.1/wf).

It works for my dev front-end. But when I push to live, it doesn’t work on the live web-app. If I switch my backend to use [https://yourdomain.com/api/1.1/wf](https://yourdomain.com/api/1.1/wf), then it works.

I cannot find any documentation on best practice to support this. I didn’t want to send call back to both all the time from the backend. Any suggestions?

thanks.  
Amy

---

<div class="post-metadata">

**Author:** ![GH5T](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gh5t/32/209141_2.png) [@GH5T](https://forum.bubble.io/u/GH5T)\
**Post date:** [June 29, 2022, 3:46am UTC](https://forum.bubble.io/t/how-to-support-both-dev-and-production-version-of-bubble-webhook/213322/2 "2022-06-29T03:46:23Z")

</div>

Easy.

1. Create an option set called env.
2. Create the following parameters;

- display (default)
- prefix (text)

1. Create two options:

- dev (prefix = “version-test/”)
- live (prefix = BLANK)  
blank = do not enter anything.

Now, in your apis, use this parameter within the url like so:  
`https://yourappname.com/[envPrefix]/api/1.1/wf`

Now, whenever you use the api call to initialize at first, use “version-test/” as your first “envPrefix” data source, and when you use it on a workflow, use this:  
`Isn't live version:formatted as text [yes = OPTION: dev's prefix, no = OPTION: live's prefix]`.

You’ll have to do this for every API you use within your site, but it beats needing to use different API’s for test mode/production mode.  
Bam!

---

<div class="post-metadata">

**Author:** ![anna.korol](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@anna.korol](https://forum.bubble.io/u/anna.korol)\
**Post date:** [February 8, 2023, 11:09pm UTC](https://forum.bubble.io/t/how-to-support-both-dev-and-production-version-of-bubble-webhook/213322/3 "2023-02-08T23:09:07Z")

</div>

> [@GH5T](#):
>
> version-test/

How do you create a blank option? It should be something on it to enable?

How to use it in the API since it generated in the workflow?

---

<div class="post-metadata">

**Author:** ![jos2](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@jos2](https://forum.bubble.io/u/jos2)\
**Post date:** [April 5, 2024, 10:38am UTC](https://forum.bubble.io/t/how-to-support-both-dev-and-production-version-of-bubble-webhook/213322/4 "2024-04-05T10:38:33Z")

</div>

> [@GH5T](#):
>
> [https://yourappname.com/[envPrefix]/api/1.1/wf](https://yourappname.com/%5BenvPrefix%5D/api/1.1/wf)

that works perfect! thanks 🙂  
but in your example you have to remove the slash before the “/api” right? and why with an option set? its always “version-test/” or if bubble will change this in the future you never know…

---

<div class="post-metadata">

**Author:** ![GH5T](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gh5t/32/209141_2.png) [@GH5T](https://forum.bubble.io/u/GH5T)\
**Post date:** [April 5, 2024, 12:19pm UTC](https://forum.bubble.io/t/how-to-support-both-dev-and-production-version-of-bubble-webhook/213322/5 "2024-04-05T12:19:43Z")

</div>

No. This depends on your branch. If you’re using anything higher than a starter plan that is. You can utilize whatever branch name you want.

---

<div class="post-metadata">

**Author:** ![surveylupa](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@surveylupa](https://forum.bubble.io/u/surveylupa)\
**Post date:** [October 9, 2024, 9:13am UTC](https://forum.bubble.io/t/how-to-support-both-dev-and-production-version-of-bubble-webhook/213322/6 "2024-10-09T09:13:37Z")

</div>

Hi! thanks for the answer, but i’m still not sure what are the steps to use it in a workflow?

For some reason, everytime i go to live version, rather than leaving the option blank, it is automatically filled by “null”. Even if i checked the box allow blank!

Any ideas what is going on?
