Accessing author info via REST API is forbidden
I have recently run into a strange issue with my WordPress installation. Once I have published an article and tried to access the article link I received the following error:
Accessing author info via REST API is forbidden.
You might also notice blocked URL’s (500 code) in Google Search console caused by this error. This error happens only if you access this URL as a guest.
Upon investigation I have noticed that the cause of this problem is related to WordPress Security plugin (WP Security). With the version 4.2.9 of WP Security, the developer added enumeration block via REST API functionality.
This issue is not happening with all of my WordPress articles. So far I have noticed it only in one article and can’t find out what is different with this article. It could also be a WP Security plugin bug.
In order to resolve this issue, you have to disable enumeration block via REST API functionality.
Here’s how to do it:
- Open WordPress Administration page
- Click on WP Security Plugin
- Select Miscellaneous
- Click on the Users Enumerations tab
- Uncheck the “Disable Users Enumeration” checkbox
Disabling Users Enumeration option will stop this error from happening. If anyone has a better solution, please post it in the comments below.