I have a WordPress: https://example.comI need to use WP REST API.
In .htaccess:
# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]RewriteCond %{HTTP:Authorization} ^(.*)RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]</IfModule># END WordPress
I use theBasic-Auth plugin on my WordPress: https://github.com/WP-API/Basic-Auth
Nevertheless I have:
{"code": "rest_cannot_access","message": "Only authenticated users can access the REST API.","data": {"status": 401 }}
I tested with http and https.
What's wrong?