Title: REST API PROBLEM
Last modified: December 10, 2019

---

# REST API PROBLEM

 *  Resolved [prinoch](https://wordpress.org/support/users/prinoch/)
 * (@prinoch)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem-5/)
 * please i have issues with REST API when we use your API, i get the following 
   error, could you tell me the reason of the error if the API key is correct?
 * {
    “code”: “woocommerce_rest_cannot_view”, “message”: “Sorry, you cannot list
   resources.”, “data”: { “status”: 401 } }
 * store url:pwear.tk

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [Grigorij S. a11n](https://wordpress.org/support/users/grigaswp/)
 * (@grigaswp)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem-5/#post-12227504)
 * Hi [@prinoch](https://wordpress.org/support/users/prinoch/) ,
 * Thank you for reaching out!
 * I understand that you are getting a 401 response from the server. This usually
   indicates that you are not authorized for that REST endpoint. In order to use
   the WooCommerce API, you need to include your authorization in the request.
 * For the v2 and v3 API:
 * For secure connections (HTTPS), you need to use “Basic Authentication”.
    For 
   non-secure connections (HTTP), you need to use “oAuth1 Authentication”. These
   are not interchangeable, which means if you’ll use basic authentication with 
   HTTP or oAuth1 Authentication with HTTPS – that will not work.
 * This is covered in the WooCommerce API documentation: [https://woocommerce.github.io/woocommerce-rest-api-docs/#authentication-over-https](https://woocommerce.github.io/woocommerce-rest-api-docs/#authentication-over-https)
 * Also, note that normally you would pass the Customer Key and Customer Secret 
   in as header fields, but depending on how the server is configured, you may find
   that it will not parse the header fields correctly, so you may get success if
   you include the CK and CS in the URL as parameters:
 * [https://website.com/wp-json/wc/v1/products?consumer_key=%5Bkey%5D&consumer_secret=%5Bsecret%5D](https://website.com/wp-json/wc/v1/products?consumer_key=%5Bkey%5D&consumer_secret=%5Bsecret%5D)
 * I hope this helps!
 *  Thread Starter [prinoch](https://wordpress.org/support/users/prinoch/)
 * (@prinoch)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem-5/#post-12244495)
 * good day,thanks for reply. honestly i do not understand how to go about those
   steps at all…please is another way i could get assistance
 *  [Thomas Shellberg](https://wordpress.org/support/users/shellbeezy/)
 * (@shellbeezy)
 * Automattic Happiness Engineer
 * [6 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem-5/#post-12245757)
 * Hey [@prinoch](https://wordpress.org/support/users/prinoch/),
 * Usage of the WooCommerce REST API requires not only experience with programming
   languages but also with JSON and using APIs in general. Because of the advanced
   requirements of using the REST API it’s geared more towards experienced developers.
   If you are not a developer and need to use the REST API with your own code it’s
   recommended to hire a developer for the work you are doing.
 * If you are using a third-party integration which utilizes the REST API it’s best
   to get help with the third-party integration service to make sure the API user
   is working and has the proper permissions.
 *  Plugin Support [Tseten a11n](https://wordpress.org/support/users/tibetanitech/)
 * (@tibetanitech)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem-5/#post-12268671)
 * We haven’t heard back from you in a while, so I’m going to mark this as resolved–
   if you have any further questions, you can start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘REST API PROBLEM’ 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/)

 * 4 replies
 * 4 participants
 * Last reply from: [Tseten a11n](https://wordpress.org/support/users/tibetanitech/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/rest-api-problem-5/#post-12268671)
 * Status: resolved