I've installed WP-API along with Basic Auth. I'm able to fetch cpt posts using

curl http://siteurl.com/posts?type={post-type}

However, if I change a post to private, it is no longer returned. This is true even when sending the author's user credentials with either an auth header or simply using

curl http://username:password@siteurl.com/posts?type={post-type}

Is this by design? Am I missing something obvious?

EDIT: Just want to specify, I'm looking for a way to get an author's private posts returned in the JSON feed while providing their credentials using Basic Auth.

  • Private posts are hidden from logged out users, this is by design and the purpose of private posts – Pieter Goosen Mar 9 '15 at 18:47
  • Hi @PieterGoosen thanks for the response. I'm trying to get them to show up in the JSON feed for the author while providing the author's credentials That shouldn't be treated as a logged out user right? – rera Mar 10 '15 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.