The solution was to generate and use an API token.
- in WP admin, go to user and generate the key
- take that key and glue it with the username it is generated with in this format:
username:key
- base64 encode that string
- put that base64 value into the header:
'Authorization': 'Basic <base64 token here>'
In my case, the key was deleted.
Related Posts:
- How to enable the view of revisions of post in WordPress Api for custom post type?
- Does something like is_rest() exist
- REST API purpose?
- Get post count in wp rest API v2 and get all categories
- WP REST API — How to change HTTP Response status code?
- wp_get_current_user() function not working in Rest API callback function
- Search WP API using the post title
- Displaying a page built with Elementor using the REST API [closed]
- Understanding SHORTINIT with WordPress 5
- Does pre_get_posts affect REST API responses?
- Get blog title with REST v2
- Is it possible to nest the JSON result of WordPress REST API?
- Filter post_content before loading in Gutenberg editor
- Create post using rest api with html content
- Trying to get an api request getting error 404
- rest_post_query on multiple post types?
- Wp Rest Api Custom Endpoint for page subpages
- How should an old API version be deprecated gracefully?
- Full page NGINX (or Cloudflare) caching and WordPress nonces
- WP REST API returns incorrect data?
- WP 5.5 Fatal Error – get_rest_controller() in rest-api.php
- REST API GET users
- Is it posible to use wp.data.select(‘core’) outside a block?
- Can you Use the Rest API to query a custom database table
- Is there anyway to format my EndPoint URL in WordPress?
- Return WP_Error as WP_REST_Response
- Authenticating with REST API
- Make authorization mandatory on custom routes
- Custom Rest API POST endpoint with conditionally required parameters
- What is the meta field in the response of the user REST API?
- Is there any way to clear cache when making REST API request?
- Custom API endpoint to create gallery for post
- Register REST route with a multi-value parameter
- How do I add meta when creating a post with rest api?
- rest_api_init is run on every rest call to endpoint
- WordPress + REST API v2 and private pages Load by slug
- Change permissions on REST api?
- WP-REST create user with custom meta
- receive a custom parameter with rest api
- PHP: authenticate for a REST request?
- Is it Ok to restrict Access-Control-Allow-Origin for /wp-json requests?
- Validate rest-api call on create
- If I use WordPress REST API V2 and someone makes an app using it. Will my site count the posts views from the APP? And if not, then how?
- How to store and return json in a (custom) post meta field
- Authenticate current user to REST API
- rest api endpoint – accept diacritic characters
- WordPress REST API rest_comment_invalid_author Sorry, you are not allowed to edit ‘author’ for comments
- How to delete user using rest api without reassigning
- How to change the date and time in REST API for comments?
- Accessing private posts through REST API, same code that works in remote doesn’t in local
- What is an endpoint for custom post type comments in REST API?
- Rest API: trouble receiving response through script (browser and Postman display correctly)
- Advanced Access Manager: RESTful endpoint to refresh token
- `WP_REST_Controller::get_endpoint_args_for_item_schema` Does Not Set `required` Property from Schema
- Extending REST API responses
- How would I know if my system using REST api or not?
- Error message: Response is not a valid JSON response
- How to use query parameters, as “_fields”, to filter data inside an array in the REST API?
- WordPress server banning IP
- How to add Relations of a CCT from JetEngine via WordPress Rest API
- WP Rest_API- Post request for images returns empty
- DELETE request using WP REST API
- Fetching WordPress Private Posts, Public Posts Via Default REST API Endpoint
- Pass multiple tags slug to rest API
- Return a WP_REST_Response from an inner function (and not from the root callback)
- register_rest_route with method POST but in wp-json/ is showing GET
- wp_nonce vs jwt
- Rest Api fetching only one random post
- Accessing Custom REST endpoint with rest_do_request()
- Got Blank issue for get data from /wp-json/v2/post
- How do i POST to WordPress rest API from the same domain?
- WP API file_get_contents return TTP request failed! HTTP/1.1 401 Unauthorized
- WordPress improve REST API – SHORTINIT not work
- Not able to delete media by REST API
- Need to get user data via API
- REST API retrieving posts from www.sitename.com/category/news/ instead of just just from www.sitename.com
- REST API get featured image source for custom post type
- Custom rest API route not passing data along
- Rest API encoding of double quotes
- view counter update in WordPress REST api HTTP get
- How to filter wp-json/wp/v2/users response on custom metas?
- Paid membership Pro Rest API
- Trouble Commenting via the WP REST API using nonces
- wp_query json ouput
- GET request for media files in WP REST API 2 results in an empty array
- Fatal error: Call to undefined function register_rest_route()
- WordPress REST API not displaying all information
- Create a new page on front page for logged in user
- API wp-json/wp/v2/pages/ returns a different result if page is specified
- Update post / page using API + python
- Calling a Rest API with parameters on button Click
- How to cache WordPress oembed links in the page header?
- REST API – Authentication/Logon security
- WordPress json – How to use the content rendered from json
- Subscriber role cann’t add comment meta using REST API
- Restrict Image Sizes and Dimensions when Uploading via the WP Mobile App
- Can I use the Backbone REST API client outside WordPress?
- WordPress REST API function not calling from external site
- Issue with API after 6.2 update
- Verify user login and password over api