Multisite 401 API error
-
Hi – I’m trying to connect my API to woocommerce but am getting the error:
{“code”:”woocommerce_rest_cannot_view”,”message”:”Sorry, you cannot list resources.”,”data”:{“status”:401}}
When I use https://littlegreenshop.ie/wp-json/wc/v3/products?consumer_key=ck_fa470dbbfe9e2272e9263ce61533bd6aee34ce16&consumer_secret=cs_6dbd09fa0f68680fc2dc552a8de9861f10c317e9?it returns results so I know the key and the secret are correct.
But if I try to use the following URL in insomnia it gives me the error.
https://littlegreenshop.ie/wp-json/wc/v3/products/The site is a multisite installation and .htaccess file contents are as follows:
# HTTPS forced by SG-Optimizer <IfModule mod_rewrite.c> RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> # END HTTPS SetEnv PHPRC /home/customer/www/littlegreenshop.ie/public_html/php.ini SetEnv HTTPS on RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_URI} !/(wp-content/uploads/.*)$ # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L] # SGO Unset Vary Header unset Vary # SGO Unset Vary END
Can anyone tell me what I might be doing wrong here? Or suggest how I could fix it?
Many thanksThe page I need help with: [log in to see the link]
- The topic ‘Multisite 401 API error’ is closed to new replies.