Can't get Basic Auth to work with WP API
-
Hi all,
I’m a somewhat experienced C++ developer, but not as experienced with web/wp. I’m trying to get the Basic Auth plugin to work with WP API.
From what I have read, all there is to do is installing the plugin. When I do that, just viewing my wordpress page (without the /wp-json/posts string) in a browser requires authentication. I’m pretty sure that’s not the way it’s supposed to work.
Moreover, having Basic Auth installed seems not to help when trying to post to /wp-json/posts. I get a 403 no matter what I try. Here is an example of my attempts:
curl -X POST -H "Content-Type: application/json" -d '{"title":"hello", "content_raw":"some text"}' -u username:password http://mypage.com/wp-json/posts/ -vI have the suspicion I need to set some paths somewhere and wonder if there is documentation about that.
Any hints are greatly appreciated!
The topic ‘Can't get Basic Auth to work with WP API’ is closed to new replies.