Error 403 when creating WooCommerce PUT API call

Code Workshop
1/13/2018
Share with

Fixing the 403 Forbidden error when making WooCommerce PUT API calls. What causes it, how to diagnose it, and the correct fix.

Apparently, PUT requests and other types of requests fail silently on many shared hosts.

I had this error across two different customers who use WooCommerce API integrations.

Instead of PUT, simply use POST! As long as you supply the relevant ID, WooCommerce will know you’re making an update.

 

We came across this while working on WooToApp, a native mobile app for WooCommerce stores.