I found the answer, dropping it here in case someone need it.
You need to be logged in as a user that has the
edit_posts
capability. With that capability, you also get access to the private query vars, includingpost_status
.
Taken from this similar issue.
Related Posts:
- WP REST API only returning partial list of users
- WordPress REST API “rest_authentication_errors” doesn’t work external queries?
- WordPress API “code”:”rest_no_route” with Custom Route
- MySQL error 1449: The user specified as a definer does not exist
- Get WP Navigation Menu from REST API V2
- WP-API v2 Custom Endpoint Response Formatting
- WP in Docker – cannot install plugin or upgrade WP
- Implementing Isomorphic JavaScript (React JS) in WordPress?
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- Create custom permissions for user type
- WordPress REST API – Permission Callbacks
- WP API returning SQL results as strings, rather than numbers
- Recommended File Permissions
- What’s the difference between the permissions “edit_published_posts” and “edit_posts”
- Retrieving pages with multiple tags using REST API
- Wrong permissions when uploading a file through WordPress | IIS
- ftp_nlist() and ftp_pwd() warnings
- WordPress Rest API: How do we validate with our custom API key?
- How to loop through JSON data in wordpress WP REST API
- What permissions should i have set up for the Database User after i have WordPress set up?
- Why is group ownership with rwx permissions not enough?
- How to get featured post title & image using JSON API?
- WP API V2 returning Invalid User ID
- Sending POST Request from server
- How can I limit WordPress editor roles to a specific category?
- get WP-API by page id
- WordPress wp-json API – Custom Post Type returns 403
- Get more than 10 posts in a specific category with the wordpress api
- utf8 encoding in json rest api
- Implementing the wp json-rest api
- Safe to set permissions to 757 temporarily to update via wp-cli?
- How do I perform a “get” call to an external API, and then display the JSON results on a page in my WordPress site?
- how to decode % in app [closed]
- How to Increase WordPress JSON API Speed?
- Keep user’s privileges on accessing contents in JSON response
- How to add WP API and JS featured image attachment
- Why aren’t tags and categories added in post request to WP Rest API
- can’t change footer
- permissions access error
- woocommerce registration form with klaviyo(don’t work with current user)
- CMB2 Repeatable Group & JSON API
- Permissions Issue with WordPress
- WordPress REST API not returning all posts
- WordPress JSON API remove posts from a specific category
- Enable plugin installs without FTP with user from same group as Nginx/PHP-fpm
- Moved my WordPress site and now it can’t read the theme
- WordPress unable to create folders even though correct NTFS-rights are set
- WordPress php mysql errors – errcode: 13 permission denied
- Invalid changeset UUID WordPress
- Permissions in a Local Dev Environment (OS X)
- Running WordPress as FTP user?
- How to to secure WordPress file and folder permissions
- wp-content Folder Permissions (777 OK?)
- How to prevent plugins from being uninstalled
- Reseting file permissions
- What is the “user account” for WordPress’ file permissions?
- WP REST API. Configuring JSON routes
- Restrict access to trash, only admin
- How to hide wordpress error message?
- What is this error message?
- Creating a WordPress Post via REST API – HTML or Markdown?
- Is there a way I can fetch the WordPress Developer Code References with an API?
- How to convert and use JSON data from a remote WordPress server?
- How to grant user access the page [closed]
- JSON API and notification about registration
- WP REST API remove the WordPress shortcodes from the JSON wp/v2/posts content->rendered
- WordPress Theme/Plugin Information API Response to Text and Button
- How to make file not open to public but javascript file under WordPress folder can load it
- Escape commas in REST API
- WordPress REST API in Integromat: How to overcome “Sorry, you are not allowed to list users / edit this…”
- how to create JSON array [] for REST response?
- Allow Editor access to a certain plugin
- Visitors “do not have permission to view this content” on home page only
- Permissions Script Not Working
- exclude particular category in api
- How to receive JSON payload from a digital device
- Blank White page issue in WordPress
- Adding Amchart Interface to WordPress API
- Permissions working but not working
- Loop through WordPress API response errors
- How to save one API response to WooCommerce order meta data
- Deleting media using the WordPress Rest API
- Populating Custom Fields from live JSON
- Autotrader API Integration
- Extending the API I created to return category names
- Rest WP_Error always return null
- Downloaded WP but Nginx home page still showing
- Best way to make a JSON API from WordPress?
- Public and Private keys incorrect for user
- Querying Posts Using JSON API
- Developing a plugin, ran it through P3 Profiler, shows up slow, but I don’t know why
- Restrict access to specific content
- the_tags only showing when logged in?
- How get JSON from external API on every page load if not existing in transient?
- WordPress files owner changed silently
- Send PUT remote request with BuddyPress checkbox
- GRANT SELECT to all tables in postgresql
- External api call using wordpress
- Adding Microsoft Teams Incoming Webhook to WordPress, Problem with Rest Route?
- Woocommerce API for calling products by Category ID