Troubleshooting connecting Breww to WooCommerce

We have lots of breweries using our WooCommerce integration, but occasionally we get similar messages from people struggling to set up the integration. So, here’s the most common cause of problems and how to resolve it.

Error: “An error occurred in the request and at the time were unable to send the consumer data.” when granting Breww access to your WooCommerce data.**

Whilst in theory there could be a number of causes for this error, from our experience, every time we have seen this before, the cause has been a misconfiguration in the web server config (typically Apache or Nginx) on your WooCommerce server. Essentially the Authorization header that we send over with HTTP requests gets stripped out before the request is passed to WooCommerce and so WooCommerce doesn’t know how to respond.

A number of customers have reported that they resolved this issue by adding the following to their .htaccess file (assuming you use Apache as the web server, this is not applicable to Nginx).

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

Nginx (another common web server) will keep this header in by default, without you needing to add configuration to force it like with Apache.

If you manage your WooCommerce installation/server yourself, then hopefully that makes some sense, but if not it’s would be worth getting in touch with the person/company who do and passing on this information.

Breww takes no responsibility for the correctness or suitability of the above code or other suggestions. Please make sure you’re comfortable applying changes to your servers before doing so, which will be at your own risk.

Although this error is usually caused by the above, it’s possible that it’s being caused by one of the following reasons:

  • Your store doesn’t have a valid HTTPS/SSL certificate
  • You are using a “coming soon” plugin that has disabled access to the API
  • You have a installed a caching plugin that strips out the Authorization header

We hope this is useful. If you have other problems, please post below, and we’ll help out if we can.

I’m having the same issue as mentioned here, and have edited the .htaccess but still getting the error when trying to integrate. Also, how do you remove the integration? There doesn’t seem to be an option to delete.

Thanks for the message. This is a difficulty with WooCommerce vs other platforms (as it is self-hosted) and there are sometimes server configuration problems, which are out of our control to fix.

There is one other option that we can try for you - if you can manually generate an API key and secret, with read/write access, and send them to us (in a support ticket, not on the community for security purposes), we can look at using a different authentication method.

I can’t guarantee the other method will work (again it depends on your server config), but hopefully it will. It’s only possible for us to set up the other authentication method manually for you, it’s not possible for you to do it yourself within Breww. Please make sure the box is ticked to grant us access to your account when you open the support ticket.

Also, you can disable integrations yourself, but not delete them. If you’d like us to delete an unused integration, we can do so if you ask in a support ticket (and grant us account data access).

Cheers :+1:

1 Like