title: Woocommerce rest api not working 401 unauthorised
body: <p>I have wordpress 5.4.1 and woocommerce 4.2 and ssl certificate from let's encrypt</p>
  
  <p>I managed to get a response from the API before using query string <code>https://www.store.com/wp-json/wc/v3/products?consumer_key=ck_XXXX&amp;consumer_secret=cs_XXX</code> but suddenly it stopped working giving me 401 unauthorized error. I am 100% sure about the keys. </p>
  
  <p>I am using php with FastCgi and I read that sometimes the server dosn't read the authorization correctly so I tried the following</p>
  
  <p>I added </p>
  
  <pre><code>&lt;IfModule mod_setenvif&gt;
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>to my .htaccess file </p>
  
  <p>Also I added </p>
  
  <pre><code>RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  </code></pre>
  
  <p>to my httpd.conf file after RewriteEngine on</p>
  
  <p>I also installed the basic auth plugin <code>https://github.com/WP-API/Basic-Auth</code></p>
  
  <p>All of the above solutions failed to get a response from postman or insomnia with the same error 401 unauthorized.</p>