Closed knvpk closed 8 years ago
A request to wp/v2/users will return users who have currently published a public post with limited information about the user. The reason for this is on most WordPress sites if you were to see posts usually the author is shown to anyone. The only information that shows up with users request is information that can be seen without authentication in a typical WordPress install. To see more useful information wp/v2/users?context=edit requires authentication and authorization. Hope that clears it up.
This is also the docs section for the plugin and most issues brought here are about v2.wp-api.org. If I am not understanding what you need help with let me know.
Hi @BE-Webdesign , Actually I want to show all posts,users data through the API only, Bcoz I wanted to show the posts to only some users that are in some other site. And i dont want want default website given by wordpress other than the admin site. To setup this what i want change the wordpress settings.
Actually I want to show all posts,users data through the API only, Bcoz I wanted to show the posts to only some users that are in some other site.
So you are trying to display posts from a WordPress database in another site over the API? What are you not seeing in your response(s) that you need? I think the default functionality of the API should cover your needs, if I am understanding them correctly.
As per the API i got my requirement, but my actual consideration is the posts that are published should be open for the public users which is not required bcoz i want to show only for my another application authenticated users.
https://developer.wordpress.org/reference/hooks/rest_pre_dispatch/
The rest_pre_dispatch hook will allow you to add additional permissions checks for your requests.
However, if I understand how you are using the API, you would want to handle the permissions of accessing the REST API in your separate application.
No, I want the posts,categories,tags only from api but not the UI because i didnt want them to show for all public users, i want to show the posts only for my another application users.
Hi, just i set up my own wordpress site and wp-api v2 beta installed, im getting the users list when i go to this url
myurl/wp-josn/wp/v2/users
im getting the list as json im wondering this doesn't require an authentication like access token like that. I have also installedOauth server
plugin but no use of it.