Mailchimp integration shows API error

I am trying to integrate Mailchimp on my site but it keeps giving me an error: “Please enter a valid Mailchimp API key”. I had an API with another Mailchimp account, I disconnected it, logged into a different Mailchimp account, and got a new API, and when I try to connect I get the error. Also when I used the API from old account I still get the same error. Can you please check Why I can’t connect using the API?

  • Adam
    • Support Gorilla

    Hi John

    I hope you’re well today and thank you for your question!

    I checked on your staging site and I’m not sure if Hustle/site doesn’t actually even contact MailChimp – when I tested with my own API key, I had no API calls recorded in MailChimp within last 24 hours.

    If that is so, it might be related to some issue in DB or because “something” is blocking such connection on your site/server. I understand that the issue happens for you on both live and staging sites and both these sites are on the very same server, correct?

    If yes, could you please start with accessing the database for the staging site (as this is the one I tested with) using phpMyAdmin or similar tool and doing this:

    – select the “wp_options” table there (note: “wp_” is default table prefix, it might be different on your site)
    – find the row with “option_name” of “hustle_provider_mailchimp_settings”
    – delete it, especially – if there’s more than one such row (same option_name value) – remove all of them
    – after that clear any server-side cache there is (if there is any)
    – and try setting up integration again

    If that doesn’t help, please also check – or consult with your host – if there’s any kind of firewall or similar tool on server that could possibly be blocking those connections to MailChimp API.

    If that’s not the case, let me know, please and we’ll need to dig deeper into this.

    Best regards,
    Adam

  • John
    • New Recruit

    Hello Adam, thank you for helping with this.

    Thank you for your help with this. I started with the database for the staging site in phpMyAdmin and went to wp_options. I then went through the “option_name” and did not see a row with the name of “hustle_provider_mailchimp_settings”, so there wasn’t anything to delete. I went to Cloudflare and turned of caching (development mode) for the Staging site. I then deleted the Hustle plugin and then reinstalled it (v7.1.1) and tried to activate the Mailchimp integration with the api and I received the same error.

    “We couldn’t connect to your Mailchimp account. Please resolve the errors below and try again.”
    “Please enter a valid Mailchimp API key”

  • John
    • New Recruit

    Hello,
    I don’t know if you made any changes or if it just resolved itself, but today I was able to connect the Mailchimp integration on the Live website without any issues. You can consider this issue resolved, but I do wonder what the fix was. If you have any info, please share. Thank you for you help!
    – John

  • Adam
    • Support Gorilla

    Hi John

    Thank you for responses!

    I actually didn’t do any changes as I was only able to get back to your ticket just now. It’s been a bit more busy around here in last couple of days than it usually is, hence delay on my end (for which I’m sincerely sorry).

    I’m happy to hear it’s working now, though. As for what helped – if it looks like “it solved itself” in most cases it would mean that it was either some really “stubborn” cache (very likely an “object cache” that stores db data) on a serve or/and some connection issues between these two endpoints, the host and the mailchimp.

    Apparently, it’s not that unusual actually as it may seem and such thing happen, though are also usually really difficult to diagnose/identify.

    That said, it’s great to know that it is working now but if the issue occurs again on this or any other of your sites, please don’t hesitate to let me know and we’ll dig into it more :slight_smile:

    Best regards,
    Adam