Support » Plugin: iThemes Security (formerly Better WP Security) » 403 Forbidden with WooCommerce REST API v2

  • Resolved bman2232


    I have been successfully using woo commerce REST API v2 to post basic information back out of our fulfillment system. Beginning with an update this weekend, all post functionality seems to be disabled, throwing a 403 message on all post attempts. Is iThemes the culprit, or is it unrelated?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m also having trouble with this, working as intended if iThemes Security is inactivated.

    I discovered the issue in my case to be the feature. Basically it blacklists some of the most common user agent strings associated with bots used to hack websites. It also blocks any requests with an empty user agent string. I simply added a custom user agent string to my posts and now they go through as expected.

    Alternatively you could just disable this feature in iThemes security settings. There is also a method to disable the empty user agent string in the .htaccess file (quick google search can find it). Unless you know what you are doing, I strongly discourage modifying the .htaccess file on your web server.

    Yes, I found the same solution. I have an external service doing requests so cannot modify the headers. So the solution for now is to disable the feature.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘403 Forbidden with WooCommerce REST API v2’ is closed to new replies.