Skip to main content
Best answer

Failed to create a http request in WordPress

  • October 3, 2023
  • 7 replies
  • 430 views

 

 

Please help me. I enter an api request (beta) in WP and it ends with the message Failed to create a http request in WordPress, Raw request failed.

 

If I change the url it works, but it's not correct. POST should be to the entire url https://katarinaruna.com/wp-json/mioweb/v1/add-membership

 

 

In postman it's OK, so I'm probably doing something wrong.

 

Best answer by ishto

The base URL may return 200 at any situation which only means that the website is accessible for Zapier.  

Let’s do two things:

  1. On postman, get the code snippet of the request that successfully does the job you want, in Python. Check its “headers” parameter, and make sure you include those key values in your Zapier header as well.
  2. Post the error page of Zapier when the task fails. It should contain some info about the response of the endpoint that can help us diagnose the issue further

 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

  • New
  • October 3, 2023

Hey Mirka!

First thing that I see is that in the Authorization section, you’re using base64_encode function which I believe it doesn’t work this way. Just encode it once yourself and put the output there.

Second, that Authorization is meant to be an additional one. If it is your primary authorization, just skip it. Zapier will include it automatically

Third, I don’t see your query strings included in the screenshot. Make sure you do.

If the issue still persists, feel free to DM me for a deeper look


  • Author
  • Beginner
  • October 3, 2023

Thanks for your answear.

  1. the authorization should then be like this The authorization should then be like this Basic bWlvd2ViOmJmTnhBaGh0UWpwT0tWbDBpTHJtakJUSA==

     

  2. It is an additional authorization for that specific post
  3. The parameters are defined


    I get an error when I define this entire address in the url post. If I use https://katarinaruna.com it's OK.

     


  • New
  • Answer
  • October 3, 2023

The base URL may return 200 at any situation which only means that the website is accessible for Zapier.  

Let’s do two things:

  1. On postman, get the code snippet of the request that successfully does the job you want, in Python. Check its “headers” parameter, and make sure you include those key values in your Zapier header as well.
  2. Post the error page of Zapier when the task fails. It should contain some info about the response of the endpoint that can help us diagnose the issue further

 


  • Author
  • Beginner
  • October 6, 2023

Hello,
my code snipet via postman is:
 


As a result, I found out that I won't do it via event api request (beta), because I probably need a webhook. Because it doesn't create curl for me in the api, or should I enter it somewhere? 

I found this https://community.zapier.com/code-webhooks-52/using-curl-or-change-format-to-send-api-request-6998


  • New
  • October 6, 2023

Yeah just make a simple Post request and it should work 


  • Author
  • Beginner
  • October 7, 2023

Hello, super, I registered via webhook and it opened the members' section. But when I went to make an order to make sure that I was going to test it in production, it didn't automatically work out for me. Is it because I don't have a premium zapier account?


  • Author
  • Beginner
  • October 9, 2023

Hello, thanks for your help, I solved it and have automated opening :-)