# name spaces, hardening, blocking accessing to certain woocommerce rest apis

I've read this wpcerber section: <a class="a a--md" elv="true" href="https://wpcerber.com/restrict-access-to-wordpress-rest-api/">https://wpcerber.com/restrict-access-to-wordpress-rest-api/</a> 

I have enabled: Block access to users' data via REST API as well as 	Block access to WordPress REST API except any of the following.

My namespaces show as follows:
{
  "namespaces": [
    "oembed/1.0",
    "2fa/v1",
    "contact-form-7/v1",
    "yoast/v1",
    "mc4wp/v1",
    "wc/store",
    "wc-analytics",
    "wc-admin",
    "testwp",
    "elementor/v1",
    "wc/v1",
    "wc/v2",
    "wc/v3",
    "wccom-site/v1",
    "wp/v2",
    "wp-site-health/v1"
  ]
}

I want to allow Woo Rest API version 3 access and so I have tried adding wc/v3 as well as wc/v3/products to allowed namespaces
but when I try to access the api, I am getting the 401 message.

// 20201221161556
// <a class="a a--md" elv="true" href="https://fee8f3a621.nxcli.net/wp-json/wc/v3/products">https://fee8f3a621.nxcli.net/wp-json/wc/v3/products</a>

{
  "code": "woocommerce_rest_cannot_view",
  "message": "Sorry, you cannot list resources.",
  "data": {
    "status": 401
  }
}

What am I doing wrong?

##### Post Metadata
- Posted at: over 5 years ago
- Net upvotes: 2


## Comments
### Comment 1

You have to add to the white list &quot;wc&quot;, not &quot;wc/v3&quot;. Meaning WP Cerber makes no distinction between versions in the namespaces. As a namespace, you have to specify the string before the first slash /.

##### Comment Metadata
- Posted at: over 5 years ago
- Author title: Keep moving forward




## Related Product
[Cerber Security, Antispam &amp; Malware Scan](https://www.g2.com/products/cerber-security-antispam-malware-scan/reviews)

## Related Category
[Website Security](https://www.g2.com/categories/website-security)

## Related discussions
- [How well does Trello scale into a larger team?](https://www.g2.com/discussions/1-how-well-does-trello-scale-into-a-larger-team)
  - Posted at: about 13 years ago
  - Comments: 6
- [Can we please add a new section](https://www.g2.com/discussions/2-can-we-please-add-a-new-section)
  - Posted at: about 13 years ago
  - Comments: 0
- [Quantifiable benefits from implementing your CRM](https://www.g2.com/discussions/quantifiable-benefits-from-implementing-your-crm)
  - Posted at: about 13 years ago
  - Comments: 4


