We were unable to connect your WooCommerce store because something is wrong with this API Key

Important: The following steps should be conducted by a technical user/web developer who will have the expertise to troubleshoot the initial connection issues to WooCommerce.

Problem

We were unable to connect your WooCommerce store to Vend due to an issue with the API Key.

Setup

  • Vend for Mac or PC
  • WooCommerce Integration

Cause

This is generally caused because of a misconfiguration of the WooCommerce store. Please check that the Consumer Key and Consumer Secret are correct.

Solution

You should download the request log to give to the person who manages your store. Alternatively, the following steps should be conducted by a technical user/web developer who will have the expertise to troubleshoot the initial connection issues to WooCommerce.

  1. Download and view the request log, if the response is coming back with on HTML, please read the HTML and see if you can determine why no JSON API response is returning.

  2. If the response is partially JSON, with HTML appended, this is likely an issue WooCommerce or WordPress internally. We’ve seen this occur with broken plugins in the past. Check the HTML in the response for errors such as PHP Warnings or Errors.

  3. If the response is pure JSON along the lines of {"code":"woocommerce_rest_cannot_view","message":"Sorry, you cannot list resources.","data":{"status":401}‌} then the authentication information is not successfully being passed. To start, attempt to request the system status of the WooCommerce installation via curl to confirm that the issue you are receiving is specific to the WooCommerce installation and not Vend.

  4. Run the following command in a terminal curl -vs --user YOUR_CONSUMER_KEY:YOUR_CONSUMER_SECRET https://YOUR_STORE.com/wp-json/wc/v2/system_status.

  5. If this returns a successful response (HTTP Status Code 200) then please contact Vend Support.

  6. If this fails with a non HTTP 401 Status Code, please inspect the response body for more information.

  7. If this fails with an HTTP 401 Status Code, this will be either because the credentials are wrong, or the server is misconfigured. To determine if it’s an issue with server configuration, attempt to pass the credentials via query parameters

  8. curl -vs https://YOUR_STORE.com/wp-json/wc/v2/system_status?consumer_key=YOUR_CONSUMER_KEY&consumer_secret=YOUR_CONSUMER_SECRET

  9. If this second command returns a successful response, your server is misconfigured and is not accepting the Authentication header and this needs to be resolved. We do not pass credentials via the query string parameters for security reasons. If this second command also failed, then further investigation will be required into why your WooCommerce installation is not accepting the presented credentials. Regardless of the outcome, this configuration issue needs to be resolved on the WooCommerce server before you can integrate with Vend.