简体   繁体   中英

Woocommerce REST API Oauth consumer key parameter is missing

I have a WooCommerce website and I am building an app for it (HTML, ANGULARJS). I need to get the products from the website to show them into the app and I am using the REST API.

To get the products from WooCommerce I am using the WooCommerce REST API PHP Client Library and I manage to get the products appear on screen via PHP.

I need to get the products via the URL but when I go to http://example.com/wc-api/v3/products I get the error

{"errors":[{"code":"woocommerce_api_authentication_error","message":"oauth_consumer_key parameter is missing"}]}

I prefer not to add an SSL to the site, I'd rather stay on HTTP and I understood that the Client Library helps me with authenticating over an HTTP request.

How can I retrieve the products from the URL or how can I retrieve a oauth_consumer_key?

Try to use "WooCommerce API - PHP Client". This library is from WooCommerce developers.

Also, read this:

https://docs.woocommerce.com/document/woocommerce-rest-api/ http://woocommerce.github.io/woocommerce-rest-api-docs/?php#create-a-product

I had similar error years ago. I just resolved it by accessing it through HTTPS , secure url and its worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM