Articles on: Frequently Asked Questions (FAQ)

How to resolve WooCommerce API Errors Caused by Firewall Blocking?

If Stock Sync cannot connect to your WooCommerce store and shows API authorization errors, a firewall or security service such as Cloudflare or Cloudways may be blocking the connection. This guide shows how to turn off the blocking feature and allow Stock Sync through.



How to Resolve WooCommerce API Errors Caused by Firewall Blocking


  1. Turn off Bot Fight Mode: Log in to your Cloudflare dashboard, type Bot Fight Mode in the Quick Search bar, and turn the setting off.
  2. Open Custom Rules: Go to Security → WAF → Custom Rules.
  3. Create a new rule: Click Create Rule and name it Allow Stock Sync WooCommerce API.
  4. Add the whitelisted IPs and expression: Use this expression, which whitelists the Stock Sync IPs and the WooCommerce API path:


(ip.src in {52.202.180.173 34.197.203.250 52.20.189.51}) or (http.request.uri.path contains "/wp-json/wc/")


  1. Set the action: Select Skip as the action, then select all security features.
  2. Move the rule to the top: Drag this rule to the top of your rule list.
  3. Deploy the rule: Click Deploy.


If you are stuck on the "Authorize" page, or your API keys keep multiplying, Cloudflare or your hosting provider such as Cloudways is still blocking Stock Sync.



Key Rules & Technical Details


  • Whitelisted IPs: The rule allows 52.202.180.173, 34.197.203.250, and 52.20.189.51.
  • Rule order: The rule must be at the top of the list so it is applied before other security rules.



Troubleshooting Steps


  • Issue: The connection still fails after the rule is deployed → Solution: Check that Bot Fight Mode is off and that the rule is at the top of the list, then reconnect your store.
  • Issue: The "Authorize" page keeps appearing, or API keys keep multiplying → Solution: Check whether your hosting provider, such as Cloudways, is still blocking Stock Sync, and ask them to allow the IPs above.



Good Articles to Continue


Updated on: 13/11/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!