WooCommerce.NET icon indicating copy to clipboard operation
WooCommerce.NET copied to clipboard

woocommerce_rest_authentication_error

Open Mediajoonaminian opened this issue 3 years ago • 0 comments

Hi I Have problem with calling this api. when I use POSTMAN for this Url: http://www.unari.ir/wp-json/wc/v3/products and BASIC AUTH evrything is fine.

but when I want to call api in C# by using below code:

RestAPI rest = new RestAPI("http://www.unari.ir/wp-json/wc/v3", "", ""); WCObject wc = new WCObject(rest); var result = wc.Category.Get(12).Result; //recieve error here

I WILL GET THIS ERROR: 'One or more errors occurred. ({"code":"woocommerce_rest_authentication_error","message":"\u0627\u0645\u0636\u0627\u0621 \u0646\u0627\u0645\u0639\u062a\u0628\u0631 \u0627\u0633\u062a - \u0627\u0645\u0636\u0627\u06cc \u0627\u0631\u0627\u0626\u0647 \u0634\u062f\u0647 \u0645\u0637\u0627\u0628\u0642\u062a \u0646\u062f\u0627\u0631\u062f.","data":{"status":401}})'

WHER IS THE PROBLEM?

Mediajoonaminian avatar Jul 20 '22 13:07 Mediajoonaminian