I'm looking for a way to disable Rest API for a user role called 'external_user' (disable wp-json queries.)
This user role can see right now alot of posts and pages information with when we put wp-json on the URL (users, pages, posts...)
I use actually the plugin DISABLE REST API but it prevent only not logged users to see json informations. i need to do the same thing with external_user role.
If it's not possible, can I redirect this user role (and only external_user role) to 404 pages if he try to put an URL with wp-json ?