Cannot use WordPress Application Passwords: "code": "rest_no_route" "status":404 for /wp-json/wp/v2/users/me/application-passwords

I am trying to use Application Passwords on Wordpress 5.9 for the development of a client app. The page https://www.example.com/wp-admin/authorize-application.php shows the Application Passwords confirmation prompt, but if I click generate Approve the connection for the app, an error is shown: No Path provides a match between the URL and the requested method. I also tried to GET the path /wp-json/wp/v2/users/me/application-passwords?_locale=user that is supposed to answer the request, but it says 404 error.

The base path for wp api works well (/wp-json).

I have installed WordFence and iThemes Security.

I checked in WordFence and Application Passwords is not disabled, in iThemes Security I cannot find a similar option.

Application Passwords seems to be not completely disabled, since the page https://www.example.com/wp-admin/authorize-application.php is visitable and in the profile page I have the (empty) list of Application Passwords...

I tried to write add_filter( 'wp_is_application_passwords_available', '__return_false' ); in functions.php to see if there would be any changes in the behaviour and, doing so, the page https://www.example.com/wp-admin/authorize-application.php says that Application Passwords is disabled.

What could be the cause of this issue?

Topic wp-api rest-api Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.