WP REST API Require Password for GET Endpoint
When we register a rest route with register_rest_route(), then we can use the permission_callback parameter with the kind of permission we want. Check for example how WP_REST_Posts_Controller::register_routes() and WP_REST_Users_Controller::register_routes() implement the permission callback. The password argument you’re referring to is the content’s password, that you can set for each post and that’s not the same. … Read more