Securing REST API wp-json/wp/v2/users endpoint
Securing REST API wp-json/wp/v2/users endpoint
Securing REST API wp-json/wp/v2/users endpoint
The /?rest_route URL is the non-prettified version of /wp-json, which is the URI the WordPress REST API uses. The REST API should not be disabled since the Admin UI relies upon it. Having said that, you can require the REST API only service authenticated users. To require authentication, add the following rest_authentication_errors filter: add_filter( ‘rest_authentication_errors’, … Read more
Script tag in string in wordpress rest api body to create post
Edit – Solution: the issue was that the url had http and not https, it seems i have to use the https version, although its weird I kept getting 200 response before.
Custom WP Rest API Endpoints from JSON Schema
In Rest API 2.0 is it possible to get some meta fields but not others?
API request forbidden when requesting from same domain
WP REST API with Basic Auth at target website
I found the issue. I am missing the trailing “/” on the uri. If I add that to the individual post uri, it works as designed.
This is related to how you declare the parameter types for the endpoint. If you use integer then the parameters will be converted to integers, so in cases where a null value is being used you will get 0. The solution is to add support for both integer and null e.g. ‘type’ => [‘integer’, ‘null’],