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:
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/
):
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:
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
.
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.
Thank you. So the problem is in my Woocommerce auth. I will check it and if find the reason, will leave it here