I'm using woo api, when I create a product it works but when I update it gives an error

I’m using woocommerce api, when I create a product it works but when I update it gives an error
ERROR: Forbidden - perhaps check your credentials?

403 - "\n\n403 Forbidden\n\nForbidden\n

You don’t have permission to access this resource.

\n\n" - 403 Forbidden Forbidden

You don’t have permission to access this resource.

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @nhanh102 :wave: Welcome to the community :tada:

That sounds like you don’t have the proper permissions set up on WooCommerce - can you follow this guide? WooCommerce credentials | n8n Docs and make sure that you have both read and write permissions :+1:

image
Thanks for sharing, I did it right after initialization but it didn’t work. I have tried many ways and it only works when I use the post style combined with request. I am using CWP my friend said that maybe it is being PUT blocked, What do you think about this.

Hi @nhanh102 :wave: Thanks so much for confirming with that screenshot - can you double check that the Product ID is correct? :thinking:

image
I tested it to be absolutely correct, and I had to use a different approach in updating by using POST instead of PUT.

2 Likes

Hi @nhanh102 - glad you got this sorted out, and thank you for posting what your solution was for others to see!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.