Title: WooCommerce REST API cookie issue 401
Last modified: October 5, 2019

---

# WooCommerce REST API cookie issue 401

 *  Resolved [pabloleone](https://wordpress.org/support/users/pabloleone/)
 * (@pabloleone)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/woocommerce-rest-api-9/)
 * Hi [@all](https://wordpress.org/support/users/all/),
 * I’m having a problem with WooCommercer REST API.
 * My site is under https, I’ve created a REST API consumer key and enabled the 
   legacy API.
 * The issue is when I’m logged in.
 * This URL works when I’m not logged in.
 * [https://shop.gobokly.com/wp-json/wc/v3/products?consumer_key=123456&consumer_secret=123456&page=1&search=Gl&status=publish](https://shop.gobokly.com/wp-json/wc/v3/products?consumer_key=123456&consumer_secret=123456&page=1&search=Gl&status=publish)
 * As soon as log in the response change to
 * {“code”:”woocommerce_rest_cannot_view”,”message”:”Lo siento, no puedes listar
   los recursos.”,”data”:{“status”:401}}
 * I’ve tested using Postman and the issue is with the cookie header, the problem
   is that I’m not sure why the cookie is overriding the REST API authentication,
   moreover, this happens even when I’m logged in as admin which has all permissions.
 * How can I prevent the cookie to be read and cause the issue?
 * Thank you.
    -  This topic was modified 6 years, 7 months ago by [pabloleone](https://wordpress.org/support/users/pabloleone/).
      Reason: Highlight the issue in the title
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwoocommerce-rest-api-9%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/woocommerce-rest-api-9/#post-12055263)
 * Hello [@pabloleone](https://wordpress.org/support/users/pabloleone/),
 * This is a fairly complex development topic. I’m going to leave it open for a 
   bit to see if anyone is able to chime in to help you out.
 * I can also recommend the following places for more development-oriented questions:
    - WooCommerce Slack Community: [https://woocommerce.com/community-slack/](https://woocommerce.com/community-slack/)
    - Advanced WooCommerce group on Facebook: [https://www.facebook.com/groups/advanced.woocommerce/](https://www.facebook.com/groups/advanced.woocommerce/)
 * I often see people post REST API questions in the community Slack. That’s where
   I would suggest asking first. It’s a good spot to go for this type of assistance.
 * Best

Viewing 1 replies (of 1 total)

The topic ‘WooCommerce REST API cookie issue 401’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [cookie](https://wordpress.org/support/topic-tag/cookie/)
 * [Woocommercer](https://wordpress.org/support/topic-tag/woocommercer/)

 * 1 reply
 * 2 participants
 * Last reply from: [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/woocommerce-rest-api-9/#post-12055263)
 * Status: resolved