The REST API does not support basic authentication out of the box, you need a plugin. The documentation points to this one, accompanied by this warning:
Note that this plugin requires sending your username and password with every request, and should only be used for development and testing i.e. not in a production environment.
Related Posts:
- How to: Make JWT-authenticated requests to the WordPress API
- WordPress Rest API: How do we validate with our custom API key?
- How to Authenticate WP REST API with JWT Authentication using Fetch API
- authentication issue with rest api – rest_cannot_create
- Can I authenticate with both WooCommerce consumer key and JWT?
- WP REST API: check if user is logged in
- How to login to WordPress site using basic authentication HTTP headers?
- Can we access the REST request parameters from within the permission_callback to enforce a 401 by returning false?
- WordPress REST API “rest_authentication_errors” doesn’t work external queries?
- Can’t GET draft posts via REST API from headless frontend
- Create Session with JWT
- WP REST API GET Requests require authentication
- current_user_can(‘administrator’) returns false when I’m logged in
- Authenticating with REST API
- Make authorization mandatory on custom routes
- WP REST API – Nonce passes wp_verify_nonce even after logout
- How to force JWT auth for default GET endpoints of WordPress rest api?
- REST API: best place to set current user for JWT auth?
- WordPress + REST API v2 and private pages Load by slug
- REST API authentication for a plugin
- PHP: authenticate for a REST request?
- Authenticate current user to REST API
- Rest API: wp_verify_nonce() fails despite receiving correct nonce value
- Getting 401 from ajax using an application password
- How to connect android app with WordPress website?
- WordPress REST API calls that depend on the WordPress User
- WordPress HTTP API NTLM Authentication
- Advanced Access Manager: RESTful endpoint to refresh token
- Best Authetication between REST API and Mobile App
- Log in user using WordPress REST API
- Secure WordPress API, how?
- wp_nonce vs jwt
- register/login api
- How can I secure my custom rest api endpoint or add under a already existing rest group
- Register rest field authentication with REST API
- REST API Integration without user account?
- WP REST API with Basic Auth at target website
- Cant POST with REST API on WordPress
- REST API – Authentication/Logon security
- custom REST endpoints and application passwords
- wordpress rest api authentication failed
- How to use WP-REST API to login user and get user data for Android app?
- WP REST API returns blank response if post is too long
- How to feed a HTML5’s EventSource with a REST API custom endpoint?
- Retrieve CSS and JS From the REST API
- WordPress 4.7 REST API endpoints
- REST API multiple media upload
- 401 Error when trying to make a REST API call to site
- Does jQuery/Ajax send cookies when using the rest API or do I need to somehow add them?
- Android authentication
- Upload image to wordpress using REST API
- Can I define multiple callback methods depending on the call method?
- Filter post content in REST API
- Formating content rendered from wordpress REST API as JSON and not HTML
- How to filter users on custom meta fields in WP JSON v2?
- How can I return an image from a custom REST API endpoint?
- How add meta fields to a user with the wp-api?
- WordPress Rest API response
- Why does AWStats show /wp-json* as Viewed URLs
- How send get request to external api with username and password
- permission_callback has no effect
- Updating link on page via REST api
- How to order WordPress Rest API data
- WP Rest API – How to convert embedded to json object in Java [closed]
- featured image not found in json from wp rest api
- WP REST API plugin 500 errors?
- wp-cli command throws error : “SSL routines:tls_process_server_certificate:certificate verify failed” while querying https website
- Setting maintenance mode via REST API
- How to receive data by http POST request
- WP API querying a custom post type and a custom field
- Custom endpoint to get all custom taxonomy terms
- Notify Jenkins of new post on WordPress
- Curl requests sent two times
- Manipulating/view postmeta remotely
- How to get author meta into post endpoint in api v2
- WordPress REST API V2: how to get list of all posts?
- How to get data from /wp-json/wp/v2/users/me
- WordPress REST API parameters are not affecting a response
- Update meta_value in wp_postmeta using API
- WordPress plugin with CORS
- User following system via REST API
- “Error: cURL error 60: SSL certificate problem: certificate has expired” when create product in WooCommerce via REST API
- How to use WordPress REST api to login a user?
- Can I overwrite default WordPress Json API For no more pages text
- Wrong encoding of dynamic block properties problem when loggen in as editor
- Media gallery images url instead of ID on WP API
- What’s the right way to validate JSON data coming from an AJAX POST request?
- Need wp rest api for featured video post
- WordPress API “code”:”rest_no_route” with Custom Route
- WordPress Update Role using API Cross site
- Rest API. Post content
- REST api header link href
- WordPress & React Native
- update meta data (like view counter) by rest-api
- Rest API hook ‘rest_insert_post’ not returning request object
- How Can I keep password protected posts in the json requests but not on frontend queries?
- Script tag in string in wordpress rest api body to create post
- Customizer Changeset, Sidebar and Rest API Custom Endpoints
- Rest Api WordPress
- Rest API is running, but /wp-json/wp/v2/ shows only old dates