Basic Auth request error : "invalid body format"

Hi Make community !

I’m new here and trying to make a Basic Auth request for the first time with Make, to get an order list from an order management system.

So here is the request i’m trying to make

but as you can see i’m getting the following error :
ERR_INVALID_BODY_FORMAT",“message”:“Le format du body est incorrect”}

I tried this same request with an other automation tool i used to use, and i don’t get the same error (i manage to get the order list i’m expecting with this other tool. Here is for comparison the json request from this other automation tool, which is working fine

I believe i put the same parameters in the Make Basic Auth request but don’t understand why i’m getting this Body format error. Any idea why…?

thank you very much for your help on this !

Did you use the same Auth header as well?

Do you have a link to the external service’s API documentation?

2 Likes

Hi @fdolin

Welcome to Make Community! Please review the API documentation and ensure that the parameters included in the HTTP call are within the specified sections. Double-check that you’ve included the parameters in the required fields.
Please provide the API documentation so we can help you further.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

Hi @samliew thanks for your answer !

actually i tried to adapt what i had done on the old automation tool i was using into my make.com automation.
Here is what i had put in the tool to get the json above

Maybe the error comes from the ‘explode’ parameter …?

Attached is the external service’s API documentation (sorry this is in french but quite short and probably understandable…?)

API REST e-Kan OMS - Généralités.pdf (128.8 KB)

thank you for your help !

Looks like the documentation is for the authentication, but not for the endpoint you are calling /v1/commandes/liste

2 Likes

You’re right…
I also have this short doc

thanks for your help!

Looks like etatsCommande is accepting an array of strings.

You might want to try

{{ add(emptyarray; "ATTENTE_STOCK") }}

Screenshot_2024-02-02_170235

This will make it an array with a single value “ATTENTE_STOCK”

(There is no explode function on Make)

2 Likes

i tried with {{ add(emptyarray; “ATTENTE_STOCK”) }}

but still getting the “code”:“ERR_INVALID_BODY_FORMAT”,“message”:“Le format du body est incorrect”}

However when i check input json it doesn’t seem to put the single value ATTENTE_STOCK in an array as supposed to do… ?

are you sure {{ add(emptyarray; “ATTENTE_STOCK”) }} should do the job ?
many thanks

Ah, you can’t put it in the Query String field.

If you look at the documentation carefully, it says “body”, and the content type is JSON.

Copy everything in the red box into here, and modify accordingly.

2 Likes

It works ! :raised_hands:
Thank you so much for your help ! :pray:

No problem, glad I could help!

1. If you have a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

others can save time when catching up with the latest activity here, and

  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!