The answer for me was setting the X-WP-Nonce with the wpApiSettings.nonce in the headers.
Related Posts:
- Nonce retrieved from the REST API is invalid and different from nonce generated in wp_localize_script
- REST API: Backbone and custom endpoint
- Gutenberg custom block plugin with custom image sizes
- Get loading state of wp data selector
- WP REST – video and audio players
- Headless WordPress: How to authenticate front end requests?
- Post to WordPress using REST API from external site
- How to handle malformed response from WP REST API?
- Rest API authentication issue when called from fetch request in bundle.js
- Get HTTP response code on non-2xx apiFetch request
- Rest API invalid nonce with Backbone Client
- WP REST API Post Status Using JavaScript
- How to transform a legacy widget into a block
- Authentication with the Rest API when using an External Application
- Get Block Attributes in JSON REST API
- Setting/unsetting terms using the Backbone JavaScript client
- Checks when fetching data from multiple REST API endpoints in Gutenberg
- Search for a keyword across post types in a Gutenberg component
- Using apiFetch for retrieving post data in Gutenberg
- Get terms of a taxonomy using useSelect
- Return ‘X-WP-Total’ from headers in response
- How to render WP Rest-API Endpoints in a React.js Theme with Woocommerce
- Retrieving data about comments and likes
- how to use nimble-API and Display data?
- Check if user can in javascript
- wp-api Backbone JS Client fetch options
- Why does my array sort order changes when I pass it to JS using WP_REST_Response?
- Rest API and how to deal with it in server side
- Access checks with custom REST endpoints and backbone
- [Vue warn]: Error in render: “TypeError: Cannot read property ‘wp:featuredmedia’ of undefined – REST API
- Update block once an API request returns with a value
- Get user in rest API endpoint
- How to improve WP-Rest atrocious response time?
- I would like to retrive JSON value and display it in wordpress page or widget
- Connecting a wordpress site to an AngularJS APP
- WP REST API – “rest_user_cannot_view” ONLY on specific users
- Get Comment Text via REST API
- What is TypeScript and why would I use it in place of JavaScript? [closed]
- How to do associative array/hashing in JavaScript
- How to play audio?
- How to write a countdown timer in JavaScript?
- TypeScript foreach return [duplicate]
- JavaScript replace/regex
- how to render a react component using ReactDOM Render
- What does “javascript:void(0)” mean?
- What does this symbol mean in JavaScript?
- Go back button in a page
- ‘react-scripts’ is not recognized as an internal or external command
- how to get the last character of a string?
- Set timeout for ajax (jQuery)
- Escaping Discord subset of markdown
- ESLint Parsing error: Unexpected token
- Angular ForEach in Angular4/Typescript?
- Timers in React Native (this.setTimeout)
- CSS height 100% percent not working
- Angular 4 setting selected option in Dropdown
- Proper way to wait for one function to finish before continuing?
- XMLHttpRequest module not defined/found
- Bower: ENOGIT Git is not installed or not in the PATH
- Converting an object to a string
- How can I convert an image into Base64 string using JavaScript?
- declaration or statement expected javascript/typescript
- The preferred way of creating a new element with jQuery
- How to pass parameters using ui-sref in ui-router to controller
- What does ngf-select do and why is it needed for form validation?
- Add and remove multiple classes in jQuery
- How To Save Canvas As An Image With canvas.toDataURL()?
- NPM install fails with node-gyp
- What are alternatives to document.write?
- What are differences between SystemJS and Webpack?
- How to find if div with specific id exists in jQuery?
- TypeError: $ is not a function WordPress
- Fully responsive HTML5 video
- Make Discord bot send picture with message with NodeJS
- RegEx for Javascript to allow only alphanumeric
- How to check for an undefined or null variable in JavaScript?
- HTML anchor link – href and onclick both?
- Remove extra Google Maps script
- single page wordpress
- initial open/toggle PluginDocumentSettingPanel panel in document setting block editor gutenberg
- How to add JavaScript code on WordPress properly?
- Restrict file types in the uploader of a wp.media frame
- How to stop a Gutenberg Block from firing multiple GET Requests?
- Gutenberg getMedia() in post query doesn’t return all featured images
- Can I change an external script’s HTML?
- const { __ } not working in IE11
- Adding and removing hidden buttons from WordPress Customizer Tinymce widget editor using javascript API
- Performance vs plugin genrated javascript
- Cannot use characters ” in jQuery script in WordPress
- How to install cool javascript feature in WordPress?
- How can I load certain JavaScripts only on blog pages?
- jQuery UI Tools (Flowplayer) Issues
- Normal for scripts to be loaded after body tag?
- Close modal window after form submit [closed]
- JS inside modal doesn’t work
- How to Get Post Meta in .Js File [duplicate]
- How do you change the text “Update failed. You are probably offline.”
- How can i get the same ajax result using WP REST API instead of admin-ajax?
- JavaScript problem in a WordPress PAGE
- Use add_action to run a script, but only on the post editor page