Solved

WooCommerce error message: "Unable to access the orders API, please check connection settings and try again."

  • 9 March 2021
  • 7 replies
  • 317 views

Badge

Hi! I’m getting this error when i try to Connect to WooCommerce from Klaviyo Integrations:

Unable to access the orders API, please check connection settings and try again.

 

If I generate a new pair of keys and select Legacy API, it connects, but I want to use the new API so it can sync periodically. The site is behind Cloudflare. I tried to set a firewall rule to allow Klaviyo user agent but no luck.

I would like to know what may be causing this.

 

Thank you,

icon

Best answer by Diyafury 3 August 2021, 16:04

Hi guys

 

I had the same issue… the credentials worked with the legacy api and not the current rest api…

Basically I discovered that If there’s an error with the orders response, then you won’t be able to connect… this happened in my case.

 

I tested the woocommerce orders request url with my consumer key and secret with the Postman app and noticed that there was an error in my code (a missing null check)… a very simple fix and now I can connect woocommerce with Klaviyo.

 

To test in postman… please see here: https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API

View original

7 replies

Userlevel 5
Badge +4

Hi @wpbuffs,

There are a few issues which can result in that message. Some of the most common causes are our system being unable to reach your server or issues with the keys you’ve provided. Since you are able to connect using the Legacy API, it sounds like it’s an issue with the keys you’re using.

The process to create a Legacy API key in WooCommerce is different from the process to create a REST API key for the V3 integration. Are you following these instructions to create the REST API key?

Best,

Caroline

Badge

Hey Caroline,

Yes, we are following the steps at https://docs.woocommerce.com/document/woocommerce-rest-api/, however, when we insert the consumer key and consumer secret, it says Unable to access the orders API, please check connection settings and try again.

So not sure which could be the problem here.

Thank you,

Userlevel 5
Badge +4

Hi @wpbuffs,

I would recommend initially integrating your account with the WooCommerce legacy API information (since you mentioned the integration seems to work fine with the legacy keys), and then once the integration is functioning, follow the instructions here to upgrade to the real-time integration.

Best,

Caroline

Hi, I’m having the same issue as a new customer - same error message when I try to upgrade to the real-time integration, having followed all the steps you laid out above @caroline . Can you give me a hand? The real-time info is one of the reasons we are so interested to try Klaviyo. Thanks, Sanjay

Userlevel 6
Badge +5

Hello @SanjayB,

Thank you for your reply and thank you @caroline for providing those steps.

@SanjayB, in order to use WooCommerce’s API v3 you must be on WC Version 3.5x or later and WP Version 4.4 or later. Can you confirm that you meet both of these requirements?

Hi @dov.derin, thanks for getting back to me so quickly. Yes, I’m on WC 5.1 and WP 5.7

S

Hi guys

 

I had the same issue… the credentials worked with the legacy api and not the current rest api…

Basically I discovered that If there’s an error with the orders response, then you won’t be able to connect… this happened in my case.

 

I tested the woocommerce orders request url with my consumer key and secret with the Postman app and noticed that there was an error in my code (a missing null check)… a very simple fix and now I can connect woocommerce with Klaviyo.

 

To test in postman… please see here: https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API

Reply