Aaron Magnaye
Aaron Magnaye

Reputation: 101

Create Public Endpoint for Wordpress API

I am getting a 401 Unauthorized error when I try to access a public endpoint I made, through POSTMAN.

enter image description here enter image description here



Though, if I log into the wp-admin and access it via Browser, it works fine.

enter image description here



I already added '__return_true' as the permission callback, as the WP API Handbook suggested, but it still does not work when accessed publicly.

enter image description here

How do I make the API endpoint public/accessible to anonymous users?

Upvotes: 2

Views: 733

Answers (1)

Aaron Magnaye
Aaron Magnaye

Reputation: 101

I ended up uninstalling plugins for the site, and it turns out a plugin called "password protect" causing this error.

Upvotes: 2

Related Questions