I am trying to connect with WooCommerce using API v2.
I am using WooCommerceNET=0.8.1 and NETFramework=v4.7.2
Code:
using WooCommerceNET;
using WooCommerceNET.WooCommerce.v2;
using WooCommerceNET.WooCommerce.v2.Extension;
...
public void AddToWoocomerce()
{
string consumerKey = "ck_....";
string consumerSecret = "cs_...";
RestAPI rest = new RestAPI("http://makm862.vot.pl/wp-json/wp/v2/", consumerKey, consumerSecret);
WCObject wc = new WCObject(rest);
}
I got exception:
Please use WooCommerce Restful API Version 2 url for this WCObject. e.g.: http://www.yourstore.co.nz/wp-json/wc/v2/
- It worked fine with Python (https://pypi.org/project/WooCommerce/) before, but I need in C#.
- Legacy API enabled
- Read/Write mode
- WooCommerceNET.0.8.0 also checked
What I am doing wrong?
2
Answers
Yeah, that't right. I copied it from example with
not
and didnt noticed there is other url.
Sorry for such a trivial problem.
Your link is
It should be: