You hit the WooCommerce REST API for /wp-json/wc/v3/products/categories and get this back:
{
"code": "woocommerce_rest_cannot_view",
"message": "Sorry, you cannot list resources.",
"data": { "status": 403 }
}
This is WooCommerce’s way of saying “I do not trust this request enough to show you product data.”
Most of the time the store is fine. The problem is permissions or authentication on the REST API request – wrong keys, wrong user, missing caps, or a server that is stripping your Authorization header.
Let’s walk through the quickest checks first so you can get a clean JSON response out of /wc/v3/products/categories again.
I am calling WooCommerce REST API GET /wp-json/wc/v3/products/categories and getting “Sorry, you cannot list resources” with code "woocommerce_rest_cannot_view" and status 403. How do I fix this and list product categories correctly?
If you are wondering what is broken: WooCommerce is blocking your REST API request at the permissions check. It does not think this request is allowed to view product categories, so it refuses to list them.
Every WooCommerce REST endpoint has a permission check. When you call /wc/v3/products/categories, WooCommerce:
If that check fails, you get:
woocommerce_rest_cannot_view with message Sorry, you cannot list resources.
In real sites this usually comes from one of these:
Authorization header so Basic Auth never reaches WordPress.Before debugging auth, make sure the REST endpoint itself is alive.
https://your-site.com/wp-json/wc/v3/products/categoriesPossible results:
If the endpoint worked in the browser while logged in but fails from Postman, a mobile app, or another service, it is almost always an auth issue.
Over HTTPS, the simplest method is HTTP Basic Auth with the consumer key and secret.
From a terminal:
curl -u ck_your_key:cs_your_secret \
"https://your-site.com/wp-json/wc/v3/products/categories"
From Postman or your app:
ck_... (your consumer key).cs_... (your consumer secret).If you now get a 200 and JSON data, the problem was simply missing or misused auth.
Some servers or proxies strip the Authorization header. In that case, WooCommerce never sees your Basic Auth at all.
As a test, try:
curl "https://your-site.com/wp-json/wc/v3/products/categories?consumer_key=ck_your_key&consumer_secret=cs_your_secret"
If this works but Basic Auth does not, your server is dropping the header. You can either:
Authorization header (often a web server config tweak).If you get “Sorry, you cannot list resources” even when logged in as the same user in the browser, the user linked to your keys does not have the right capabilities.
If you use a role editor plugin, it can easily remove WooCommerce caps that the REST API expects.
If it now returns data, your custom role tweaks were blocking access. Re enable the role editor and make sure the key owner has at least:
readmanage_woocommerceview_woocommerce_reports (not always required, but common in access checks)After fixing caps, re test the same /wc/v3/products/categories call.
On local or unusual hosting, WooCommerce sometimes cannot see that the request is secure or authenticated, even when you send credentials.
https://your-site.com/wp-json/wc/v3/products/categorieshttps://.If you are on localhost without SSL and keep seeing auth issues, you may need to configure your local server so WooCommerce treats requests as secure and allows Basic Auth, or use an HTTPS tunnel (like ngrok) for testing.
If you control the server, you can quickly check whether the Authorization header is present at PHP.
headers-test.php.<?php
header( 'Content-Type: text/plain' );
print_r( apache_request_headers() );
If you do not see an Authorization header there, your web server is stripping it. Talk to your host about enabling Authorization pass through or use the query string method for your WooCommerce API keys.
WooCommerce REST API requires pretty permalinks. If routing is broken, your auth tests may give you confusing results.
https://your-site.com/wp-json/and confirm you see a JSON index, not a 404.If /wp-json/ itself fails, fix that first with your host. The WooCommerce API builds on top of the core REST API.
At this point you should have:
/wp-json/ works.If you still see the same 403 error, I will need a bit more context to help you pinpoint the blocker.
Scroll down, click Continue Chat, and send me:
You will know it is fixed when:
GET /wp-json/wc/v3/products/categories returns a 200 with JSON category data./wc/v3/products?per_page=1 using the same credentials.woocommerce_rest_cannot_view or “Sorry, you cannot list resources.”Hit Continue Chat below and I will help you inspect your request, keys, roles and server setup until we find the exact reason WooCommerce is blocking that endpoint.
Scroll down to the contact form below. Enter your name, email, and WordPress needs. Atiba will get back to you as soon as possible.
WP Assistant is a free tool created by Atiba Software, a WordPress design and development company located in Nashville, TN. If you need more personalized WordPress assistance let us know, and we’ll get back to you ASAP!