Skip to main content
New Member
March 9, 2021
Solved

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

  • March 9, 2021
  • 14 replies
  • 2051 views

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,

    This topic has been closed for replies.
    Best answer by Diyafury

    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

    14 replies

    caroline
    Klaviyo Alum
    March 11, 2021

    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

    Caroline Lu
    wpbuffsAuthor
    New Member
    March 15, 2021

    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,

    caroline
    Klaviyo Alum
    March 19, 2021

    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

    Caroline Lu
    Contributor I
    April 14, 2021

    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

    Dov
    Klaviyo Alum
    April 14, 2021

    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?

    DD
    Contributor I
    April 14, 2021

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

    S

    DiyafuryAnswer
    Contributor I
    August 3, 2021

    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

    itsterry0908
    Contributor II
    Contributor II
    September 24, 2021

    Hello,

    I`m new member here, I have encountered same issue when connect to Woocommerce: Unable to access the orders API, please check connection settings and try again. Have enabled legacy API, but also failed, how to solve this?

    Taylor Tarpley
    Community Manager
    Community Manager
    September 28, 2021

    Hi @itsterry0908

     

    Welcome to the Community! We are so happy you’re here! 

     

    I know getting started can be difficult at first, but you will get the hang of this thing! Can you confirm that you’ve tested all of the possible solutions listed above by some of your fellow users? 

    • Followed these instructions to create a rest API key, as the issue could be lie in the rest key
    • If the issue still persists, initially integrating with the Woocommerce legacy API information, once the integration is functioning, follow the instructions here to upgrade to the real-time integration
    • Ensuring your integration is an updated version of Woocommerce: Version 3.5x or later and WP Version 4.4 or later 
    • Using the Postman app, investigating if there is a error in your code between the WC orders request url and your consumer key

     

    If you are still experiencing issues after following all these possible troubleshooting solutions, I would reach out to our awesome Support Team as they will be able to do a deep-dive investigation into your WC integration to find the error! 

     

    We’re so glad your a part of our Community! 

     

    -Taylor 

    Contributor I
    November 30, 2021

    We tested the woocommerce order API through postman and it is returning valid response. but integration page is returning, 

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

     

    Although API is returning valid orders.