API - Additional parameters to the API Call

Hi everyone,
Does anyone know what it’s happening here?

I’m trying to configure a API call, and this is working:

BUT, when I try to add more parameters to the call – as a JSON form:

It returns me this error:

The weirdest thing is that I’m using the SAME customer!!..
Really don’t understand what’s happening!
What am I doing wrong??

Appreciate any help!
Thanks!
Luiz

Just updating…
Even if I remove the same parameters from the JSON, I got the same error message… :frowning:

This is assuming you’re trying to ‘Create a new charge’…
You’re missing the Accept: application/json in the header. Add that and see if it helps.

Can you provide link to API doc? Actually, you may have conflict between paramters and json. Also, what the API expect? JSON or form-data? Because on the first screenshot, even if you set content-type application/json, Bubble will ignore it because you selected form-data

Also, I think these parameters need to be in the body parameters section instead and added to the JSON body request (where you have discount, interest, etc).

Thank you guys for your tips!!!
In fact, I thought it was possible “mixing” both ways when we make a call – form parameters AND json body, but it looks like I can’t do that and, to be honest, it makes sense! If I use one of the ways (either parameters or body) it works.

BUT, I’m trying to understand how this guy was able to do that in his plugin:

It looks like he “mixed” both ways in the same call!..
:exploding_head:

Hi @Jici ,
I can send either way and it will work!
I was trying to understand if it was possible to mix the ways (parameters AND body). Like in this plugin:

Can you share a link to the plugin? If free, you can inspect it.

That`s the problem!
The plugin is available for installation, but its page is not available – that is one reason that I want to create my own calls.

Page plugin: Plugins | Bubble

Thanks anyway for your help!

Here’s the editor link: Bubble Plugin Editor - ASAAS
I did a few tests and normally, Bubble will send nothing if there’s a conflict between parameters and body. Not impossible that the plugin API editor have a different behavior…

1 Like

TKS @Jici !
Interestingly, I have done exactly the same combination of Parameters and Body EXCEPT that I didn’t select the “Queryst.” checkbox for my Parameters fields.

And, guess what?! THAT’S EXACTLY THE SECRET!
I created the call again, checked that boxes and… voila!! It worked!

image

THANKS AGAIN for exploring this with me!!!
Appreciate your help!
:pray:

1 Like

Yes. Querystring are always sent if you select this box. This is like adding parameters to URL.