Relative Content

Tag Archive for phpwordpressapiamember

how to access WordPress private posts through API?

I get all public post through this api. “GET http://membersite.com/wp-json/wp/v2/posts”. but i have some private content, which is available in “Lessons” page. so, when i use “GET http://membersite.com/wp-json/wp/v2/post_type=lesson” i get “404 not found”. it is maintained by “aMember” and the “Lessons” part actually made private through “aMember”. it is a aMember site. i also use “https://membersite.com/wp-json/wp/v2/post_type=lesson?Authorization=Bearer1234567890” to get data through authentication. and i replace my api key with “1234567890”. But it also not working. so, also i try with “OAuth2” authentication. but still it is not worning.