Reputation: 196
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
Upvotes: 7
Views: 7131
Reputation: 2165
user one of method to auth in wordpress like:JWT, AuthBasic ..
Upvotes: -1