[CLOSED] Close x-www-form-urlencoded in JSON Body API connector

So I’m trying to set up tripe Checkout stuff. So the data needs to be sent as x-www-form-urlencode, thanks @NigelG for this pointer. So now the API connector won’t pass params from the Parameters list, we need to type everything out into the body. So we use the www-form-urlencoded syntax as very kindly pointed out by @jici, you do something like this.

The dynamic fields work, adding a hard value makes no difference AFAICT. However, the last parameter’s value is not being read. I’m not well versed in x-www-form syntax, but the examples I’ve looked at, there is no closing character, yet the API connector returns this:

Which is clearly “card”. Any thoughts on how to include the last parameter value? Is it a bug?

Did you sent the request to a requestbin to inspect what is sent exactly?
Which endpoint are you trying to reach?

v1/checkout/sessions

Merci, je reçois ceci sur requestbin:


Ça doit être la manière de reconstruire les paramètres, sur structured, ça sort avec le dernier guillemet derrière la parenthèse.

I thought maybe it was the array, but I get the same error just using a single argument:

and from requestbin:

image

There seems to be an extra space addedÉ.

Edit: there was indeed an extra space on line 3. Ouf. Thanks for your help @Jici I learned about requestbin :slight_smile:

According to doc, the array is ok and you need it.
In the first screenshot, there’s a strange ( in the first parameter. Don’t know if this can cause issue.
You are right for the space :wink:
And also, inspect the headers to be sure that they are correct oo

Yeah I think the “(” are added because it’s form-urlencode. Bubble is adding that automatically to open-close. Well we got it working :slight_smile: Thanks for your help.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.