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

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!

2 Likes