API Connector Problem. Also it needs better documentation

I have always struggled with API Connectors.

I can debug things within Bubble, but the moment I have to do an integration, I just waste days and weeks. And sometimes I just give up.

Right now I am trying to integrate an SMS service provider APIs. The API is working fine in Postman, but when I try to post using Bubble, I am getting some API error while trying to initialise the call.

Since the API is working with same parameters in Postman, it must be some configuration issue at my end. But I can’t work it out.

Documentation of API Connector that I know (Introduction - Bubble Docs) is really outdated and unclear. e.g. There are multiple ways to add parameters, but it is not clear which ones to use when and how to use.

This is the error I am getting.
Screenshot 2021-03-07 at 6.20.58 PM

This is my setting.

And this is the success in postman

And this is the documentation of the API:
https://developer.exotel.com/api/#send-sms

Any guidance on this would be of help.

Looks like you’re missing a " before the <body> value in your json…

image

It should be "Body":"<body>"

Thanks. This happened as a mistake while I was trying various things, with different combinations. I put the double quote back and still facing the same error.

The same error? Saying the Body is empty?

Yes, exact same error.

In that case I can’t help I’m afraid - the call definitely seems to be set up correctly, and the error message isn’t giving any other error other than the empty body value.

I don’t know the API in question - but looking at the docs it says the body must match exactly the SMS template added in your Exotel dashboard - so perhaps there’s an issue there?

Actually that template mismatch is not an issue. I have tried with exact template as well as non template. Both are failing here, while in the Postman both seem to be working fine. You can see in my Postman screenshot I have used SMS body as “Testing SMS delivery”, which is totally different from the template.

There are confusing things in the API connector which I get stuck on again and again. There is a place that says “[] for params”. Now that is way too small help text for dummy like me. Then there are two more ways to add params.

Then in the API documentation they have shown a different way of calling POST API, but not sure if that is how I should call in Bubble. It is not clear what is the meaning of “Private”. Like these there are many confusions here.

[] is for adding dynamic parameters in the endpoint URL

For parameters you can enter them into the parameter boxes in the API connector (name and value).

Or, if you prefer, you can use json.

‘Private’ makes the value unavailable in workflows or in the browser, so if you want to use dynamic values you need to leave that unchecked.

Thanks. These being present in documentation along with some examples would have been great.

2 Likes

Hi All,

Happy to share that I managed to solve this problem with help of Bubble Support (Not sure of their ID to tag them).

Here’s what they suggested as different ways parameters can be added, and suggested me to use query parameters.

Here’s what I did finally (One key change being I had to put “Form Data” as the Body Type

Hope it helps others facing similar issues.

Thanks,
Mukesh

1 Like