I am using WooCommerce and need to use more API features as the WooCommerce Make Module is offering.
That is why I’ve create a HTTP Module using the Basic Auth request with a fresh Consumer Key and Consumer Secret.
I have tested this request with Postman (with the same URL and credentials) and received a proper response by the API with orders in a JSON format. So generally, the API and the request is working. However, when I’m rebuilding this request in the HTTP Module in Make, I only receive some binary data block, but no JSON response.
I’ve tried to change all settings, but I have no idea how to solve it. I’m using the HTTP Module in with other APIs in other scenarios, but this seems to be special.
In most cases, I receive a 200 status with the binary response (s. screenshot). In some cases, there is a 403 error.
The only thing that came to my mind is a firewall, that is blocking the request. Still working on that. But maybe someone else here can help.
Thanks a lot!
Christian
What is the link to the API documentation for the endpoint you are calling? What is the expected response type according to the documentation?
If you need assistance in setting up the app’s universal module, or the generic HTTP module, please provide additional information about what you have tried with regards to the external service’s Developer API Reference – how you are setting the connection up, a link to the endpoint are you trying to connect to, and what errors you are encountering.
You can also complete this brand new course/tutorial in the Make Academy on how to use external APIs — API calls with HTTP modules
The endpoint that I’m calling is /orders with a filter (?status=on-hold) to filter orders in that status.
According to the documentation, a JSON format is expected. When I create this request with postman.com, I receive a proper response like this for the same request:
I had a similar problem with HTTP output as binary when my HTTP called another Make scenario. @samliew 's suggestion converts the binary into a string. Then I used a Parse JSON (binary) to extract the raw response into my pre-defined data structure. Thx Samliew!