Yes, authentication is needed, because the Posts endpoint will check whether the current user has the edit_posts
capability – see WP_REST_Posts_Controller::sanitize_post_statuses()
. Also, a HTTP status of 401
normally indicates that authentication is required.
So try again, but with an authenticated request, i.e. make sure the current user is logged-in and has the edit_posts
capability.
Related Posts:
- Updating post status via rest api
- How to add category to: ‘wp-admin/post-new.php’?
- How to Display a List of Users Who Have Made at Least 1 Post?
- Let private posts stay in status “private” after edit through “editors”
- WP Rest API v2 filter and display latest post with specific tag
- WP REST API, query total posts in a category
- featuring old articles without messing up with the archive
- Setting post meta data to random value during post status transition / on publish
- Get post from custom REST endpoint in Gutenberg
- How to change post status from publish to draft using hook in wordpress?
- Hiding by default specific post status on backend list?
- Enable commenting on front-end preview page for pending posts
- WordPress Rest API – Get all posts based on post_meta on custom endpoint
- Disable REST API for a user ROLE
- Custom Post Status Posts viewable to the public
- ping_status in JSON REST API
- How can a guest view the “Pending Review” Post?
- WordPress blog posts api – get posts by author
- WP rest api returns 404 only when author param is used
- How do I batch create revisions of all posts?
- add filter to “quick edit menu” in wordpress admin
- ‘transition_post_status’ only fires when pressing “Add New”
- What differences are there between a Privately Published post and a Draft post?
- Exclude posts w/ specific post_meta on Rest API endpoint
- Update post status from “publish” to “trash” for half of posts
- How can I set a Post’s default visibility to private and pending review checked
- Add ajax load more function using WP API
- how to remove dash (-) post status from post title on posts listing page wordpress
- Transfer WordPress post to RoR site: is the REST Api the only and/or best solution?
- WordPress REST API not returning all posts
- How to change post status from frontend?
- Exclude post_meta from Rest API Endpoint
- WP Remote Request not returning all of content via request
- Get more than one author’s posts with REST API
- How to create a post using REST API with sending data as a JSON body?
- How can I get the media inside a post?
- WordPress Rest API Create Post
- Posts and Attachments with “Published” status in Search
- Admin – create custom post status and display above table
- Restrict edit, but allow preview for custom post status
- WordPress capabilities on pending post status
- Call Web Services on post first publish
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- $post->post_type not working
- how can i allow users to view their own pending posts in a front-end page
- Getting featured image with PHP and not javascript from wordpress api _embed [closed]
- search blog posts by author first name and or last name
- Creating a WordPress Post via REST API – HTML or Markdown?
- How to get post with associated categories and tags names instead of ids with rest api?
- What date to use as a post date? date_gmt or modified_date_gmt
- Custom wp-query in wordpress rest api
- Is there a way getting post fields using `transition_post_status`
- What function publishes a post when you click the publish button?
- Post Status Frontend Announcement
- Display amount of pending posts in back/front end
- Showing posts for today and future
- Filter out posts based on a certain post_meta on the WordPress REST API
- Optimal WP Web App Backend for mobile app development
- Delete Post but retain image of post [WP REST API]
- Pull in posts using post meta for REST API
- Show Last Revision Of Post That Has A Published Status On Single Page
- How can I restore posts from ‘trash’ with their previous post_status? – WordPress
- Rest API Paginate until all posts are imported
- Add a field in my rest api
- How to set a Post’s default visibility to ‘Private’ in Gutenberg?
- How do I assign an attachment to a post using only the REST API?
- WordPress rest API get Posts parent by post ID
- exclude particular category in api
- Weird problem occurs while using WordPress REST API to create new post
- How to set the post permalink using the WordPress REST API?
- How to prevent post update using transition_post_status
- How publish post from pending status
- Hide or remove custom post status
- Put page on Archived statut after end of publication date
- get_next_post() not working with future post status
- REST API Working for GET but not for POST?
- Loading posts outside wordpress
- How to create REST Based JSON API(how to modify the code below)?
- Modify loop to include all post statuses not just ‘published’
- Best Way to detect unique posts in wp rest api
- Function/filter or plugin to change post status based on custom field value
- get_posts includes “auto drafts”?
- I am creating a front end dashboard where I need to show all the posts by the current user. So, I need to show posts in publish
- Post Format Status [closed]
- Do anything on post_status change [duplicate]
- WP Rest API feature image breaking react component
- Changes done in admin panel are taking time to reflect in the REST api responses
- Send post to remote wp site from post edit window with all data excerpt image
- editPost without undo entry
- WordPress REST API – Create post not working with 401 response but list posts working
- How do you add Read more … link to posts?
- has_archive=false on the default post type
- Change user role when post approve
- Post Loop Missing Most Recent Post
- How to get posts from a current post’s month?
- Show metabox value last post excerpt, title and link
- My website is showing today’s date instead of published date since db migration to a new wordpress
- How can I change the date format of the revision list?
- Parent menu item does not display posts when I add the sub-items
- Mix post date with post meta value using WP_Query