In my wordpress, I have public posts,draft posts and private posts. I installed WP REST API, so that I can access posts from another domain.
I am able to retrieve the public posts easily with following json command
http://www.example.dev/wp-json/posts?_jsonp=?
complete code
http://codepen.io/anon/pen/YXNrre
But, I could not retrieve private posts and draft posts. I think, I need to pass login information
I also tried
http://www.example.dev/wp-json/posts?type[]=post&_jsonp=?
http://www.example.dev/wp-json/posts?type[]=post&filter[status]=private&_jsonp=?
http://www.example.dev/wp-json/posts?filter[status]=private
How to pass authentication information to server from client side? I have wordpress login and pass word. I don't know php. I think I only need jquery. and how to access private posts from another domain using JSON? thanks in advance.