Jump to content
UBot Underground

How To Create Post Using Wordpress Rest Api


Recommended Posts

Hello,

 

I am wondering if anyone knows how to create a WordPress post by using core REST API.

 

I could not pass authentication in ubot and get 401 error when "POST example.com/wp-jason/wp/v2/posts"

 

I'll highly appreciate if someone can help. 

 

 

 

 

Link to post
Share on other sites

Hi,

Thanks for your reply. 

 

I checked the plugin but I could not figure out if it was based on REST API.

 

I just need to pass the POST request

https://developer.wordpress.org/rest-api/reference/posts/#create-a-post

 

However, the problem seems to be that I could not do authentication.

https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/

 

Here this fellow in ubot forum using the OAuth in curl.

http://network.ubotstudio.com/forum/index.php/topic/17798-using-http-post-plugin-with-woocommerce-restful-api/

 

I would be happy to pay 50$ if someone can help. 

 

Thank you

Link to post
Share on other sites

Hi,

Thanks for your reply. 

 

I checked the plugin but I could not figure out if it was based on REST API.

 

I just need to pass the POST request

https://developer.wordpress.org/rest-api/reference/posts/#create-a-post

 

However, the problem seems to be that I could not do authentication.

https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/

 

Here this fellow in ubot forum using the OAuth in curl.

http://network.ubotstudio.com/forum/index.php/topic/17798-using-http-post-plugin-with-woocommerce-restful-api/

 

I would be happy to pay 50$ if someone can help. 

 

Thank you

 

I think it may have been using the XML RPC but it may use both now because he has updated the plugin a lot over the years. You can always ask him, this is his forum profile: http://network.ubotstudio.com/forum/index.php/user/5560-pash/

 

For creating post requests your best bet is to use the HTTP Post Plugin but there is also a free plugin which may be able to do everything you need so you may want to try that first: http://network.ubotstudio.com/forum/index.php/topic/20002-free-heopas-custom-plugin-thread-lock-sqlite-thread-variables-email-ini-clipboard/

Link to post
Share on other sites

Hi

 

I was passing nonce in the header and simply doing post request after that. 

 

Like explained here, http://wiki.ubotstudio.com/wiki/Socket_add_parameter

 

The socket commands are generally avoided because they were never really fully developed but if you are just doing a few simple things they may work for you. I would ensure the headers and everything are being set correctly by looking at the requests using Fiddler.

 

I think Dan talks about using that as well as some other topics in this free course: http://www.bot-factory.com/http-plugin-tutorials/

 

He is using another plugin but the same theories apply to using the socket commands as well.

Link to post
Share on other sites

Thanks jackluter for the video.

 

​Actually currently I am using this plugin to create posts. 

 

​But since REST API is core part of WordPress now, this plugin will be outdated soon. 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...