What is Woocommerce URL in the credentials (upd. Woocommerce node not working on plain permalinks)?

I’m puzzled what to paste into the Woocommerce URL in credentials. I pasted my website URL - it gives an error.

I pasted my shop page and get some HTML code instead of products list:

Hi @artildo, I quickly tested this and it should simply be the base URL of your Wordpress installation (something like https://myblog.mutedjam.example/):

Thank you, @MutedJam. This is what I get if simply leave the website address:

This would be your webserver responding with a 404 code here. If you look at the n8n code, you can see it simply appends /wp-json/wc/v3... to whatever URL you put in the URL field.

/wp-json would be the path too the Wordpress REST-API, maybe you have enabled a plugin changing or disabling this path? Or configured your webserver in a way causing these requests to fail?

@MutedJam I think, the problem is because my website uses plain permalinks. See here:

They mean II need somehow utilize the function get_rest_url() or use ?rest_route=/ instead of /wp-son/

Don’t know how to use the function, but I tried an HTTP Request witht the basic auth for Woocommerce and this endpoint:
https://mywebsite.com/?rest_route=/wc/v3/products

Didn’t work out.

I quickly gave this a go in my browser where the REST API also responds as expected, regardless of whether I use /wp-json/wc/v3 or ?rest_route=/wc/v3.

image

So if this isn’t working for your website when trying it out in a browser, it most likely wouldn’t work if n8n tried this either.

You could temporarily try setting the permalink option to “Post name” (which is what I have on my test Wordpress instance) to see if this has any effect.

If that doesn’t help I suspect the question of how to make the WordPress REST API available at /wp-json might get better answers in a WordPress forum.

1 Like

Thank you. So the problem is in my Woocommerce auth. I will check it and if find the reason, will leave it here