API-connector can't find JSON-body?

Hi everyone,

I’ve been struggling with the API-connector lately. Somehow when I set up the POST-call with a simple JSON-body, I keep getting an error that the API was unable to find the body. This is the error:

This is how the API is set up:

It’s a simple call where I send a unique ID to match with an external db. I’ve tried just about everything in turning on these private and optional checkboxes, but to no effect. Also used request catcher, but everything seems fine in the way the call is set up.

I’ve had this problem before with another API-call. That time the problem was somehow solved by messing around with the JSON and the parameters (typing, retyping, adding and removing white spaces, etc). But that doesn’t seem to do the trick this time.

Anyone has any ideas?

Can you share link to api doc?
I think your issue is more a missing requested field…

Is that empty header actually empty or did you hide it for the screenshot?

Hid it. It’s the authorization key :slight_smile:

Not much there I think, but maybe I’m overlooking something?

Try content-type or Content-type. Some API are case sensitive.
Also, be sure to not have shared parameters that could create conflit (remove any content-type header in shared parameters).

Finally, test your call sending it to requestbin.com (or similar tools)

According to the screenshot, it’s fine, but please share the whole link to doc. Easier to find what could create issue.

Thanks for trying to help!

Afraid it’s not the case sensitivity and also tried everything with the headers. This is what the API expects. I imported the curl directly but no luck either.

This is what I got from requestcatcher:

What is this software? Are you self hosting this?

1 Like

In your screenshot, from swagger, it say unauthorized. What if you enter auth in swagger?

2 Likes

Pfff… that fixed it.

When I had testmode in swagger authorized, I could also initialize in Bubble API-connector. Didn’t think of that… Good call!

Thanks for helping out!