7

Having little access to the server on this external site, I have used WordPress and the WP REST API v2 to pull in content that is, of course, managed on WordPress. Works great!

I have been able to post Contact Form 7 data from this external site to this WordPress site and it does send an email, but the form has no validation and on the post-it returns this error.

{
    "code": "rest_cannot_edit",
    "message": "Sorry, you are not allowed to edit this post.",
    "data": {
    "status": 401
}
} 

It is posting to the page https://www.flambang.com/wp-json/wp/v2/pages/1666?_=1498600326410#wpcf7-f11791-o1 and it is strange that it even works - meaning that it sends the email and adds contact data to the DB.

Has anyone used Contact Form 7 with data that is delivered via JSON via and the WP REST API? Are there other endpoints I can use?

thanks,

Paul

Multihunter
  • 5,520
  • 2
  • 25
  • 38
pelicanpaul
  • 196
  • 1
  • 8
  • Brother have you solved this problem? I'm trying to use the contact form through the REST API and I'm not finding content to support me! Thank you! – wDrik May 23 '18 at 01:42

1 Answers1

-1

user one of method to auth in wordpress like:JWT, AuthBasic ..

  1. find proper plugin like authbasic or jwt authantication ..
  2. setup and after send reqeust
Rahman Rezaee
  • 1,943
  • 16
  • 24