• I have developed a plugin that “talks” to a laravel api, which I have also built, using json.

    The systems worked flawlessly for over a year but after the last update, both plugin and api, I am getting a CSRF token mismatch error (419) when calling the api using wp_remote_post.

    I am able to call the api from other clients , like Postman, but not through wordpress’ built in remote post method

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You need to include a 'X-CSRF-TOKEN' header as part of the POST request. This can be part of the “headers” element in the $args array of wp_remote_post(). This header needs to contain a valid token value. I’m unsure how you’d determine that. Consult with Laravel API docs perhaps?

Viewing 1 replies (of 1 total)
  • The topic ‘wp remote post CSRF mismatch’ is closed to new replies.