0

I am using WP Rest API to fetch the orders from store using consumer key and secrete in URL but its giving me error of permission and order not be read.

Kindly anyone can suggest the solution for this issue that how i can debug and solve the issue

I am getting order using API in URL as follows

https://www.onetwocosmetics.com/wc-api/v3/orders/8082?consumer_key=MY_CONSUMER_KEY&consumer_secret=MY_CONSUMER_SECRETE

SO what i get in response is any error as follow:

{"errors":[{"code":"woocommerce_api_user_cannot_read_order","message":"You do not have permission to read this order"}]}

But when i get the products using the same API it is giving all the product but orders are not getting

https://www.onetwocosmetics.com/wc-api/v3/products/?consumer_key=MY_CONSUMER_KEY&consumer_secret=MY_CONSUMER_SECRETE
Steve
  • 1,553
  • 2
  • 20
  • 29
Qasim
  • 21
  • 7

1 Answers1

0

Its solved as the API required the Admin user KEYS not a simple user like Customer, Subscribers. and also check if you are not installed any permssion manager plugin on the site.

Qasim
  • 21
  • 7