How to handle Woocommerce API credentials

For anyone wondering the same thing, it turns out that you can use the woocommerce API with any normal authentication methods.

WooCommerce includes two ways to authenticate with the WP REST API. It is also possible to authenticate using any WP REST API authentication plugin or method.

This means I was able to use the athentication method provided by the JWT plugin to authenticate the request.

This works fine until you want to use a the product API publicly. For some reason, there is no way to use the woocommerce api without authentication.

As it turns out, the products are stored as simple post in wordpress. It is possible to access them using the standar wordpress REST api using the following route.

/wp-json/wp/v2/product
/wp-json/wp/v2/product/<product id>

Those API endpoints don’t need authentication.