Are namespaces considered as an API
-
We are trying to update woocommerce products using WooCommerce REST APIs.
– I’ve been able to do this successfully on an unsecured site (no SSL) using postman and OAuth 1.0, but unable to on our new site (with SSL) using Basic Auth and postman.. we get a 401 error.a colleague of mine that is more attuned with REST API calls is trying to use what he believes to be an endpoint that was found in a namespace. For those of you not sure what I mean if you type in https://your-woocommerce-site-url/wp-json into your browser it will return json with namespaces set to this:
"namespaces": [ "oembed/1.0", "contact-form-7/v1", "yoast/v1", "mc4wp/v1", "wc/store", "wc-analytics", "wc-admin", "testwp", "elementor/v1", "wc/v1", "wc/v2", "wc/v3", "wccom-site/v1", "wp/v2" ],
As mentioned, we see a 401 error when using api call https://woocommerce-site/wp-json/wc/v3/products. My first question is this the correct endpoint for obtaining a product list?
What is interesting is that if you try this: https://woocommerce-site/wp-json/wc/store/products (wc/store was found in namespaces) is that you get a product list. I can generate this product list from the browser without any authentication. Question is this a bug/security risk that we have found? Should we be using /wc/store to get a product list? What is the purpose of this endpoint?
Appreciate your time answering these questions.
- The topic ‘Are namespaces considered as an API’ is closed to new replies.