Skip to content

Troubleshooting CURL Errors

khungate edited this page Aug 29, 2022 · 4 revisions

My server can't communicate with Mailchimp:

Servers can occasionally be blocked by Akamai - Mailchimp's API gateway service. The most common reason for being blocked is when sites are being served from shared hosting environments.

First, we must test whether or not your server itself has been blocked by the gateway. You'll need to have command line access to finish this task. If you do not have command line access, you will need to reach out to your hosting provider and have them do this for you, or enable it so you can proceed.

How to test:

Connect to your server's SSH terminal and run the following CURL command.

curl -v -X GET https://{$DATA_CENTER}.api.mailchimp.com/3.0/ecommerce/stores?apikey={$API_KEY}

  1. replace {$DATA_CENTER} with your actual data center at Mailchimp. You can see it in your API key.
  2. replace {$API_KEY} with your actual API key from Mailchimp.
  3. execute the command
  4. copy the results and xxxx out your API key
  5. use this copied text in your support chats with Mailchimp.

Possible outcomes:

  1. You get a valid response 200 status code with a JSON response. This means your server itself can communicate with Mailchimp.

  2. You get an invalid response like a 500+ status code which means your server has been blacklisted by Akamai.

How to resolve:

Resolving number 1 and number 2 often involves the same action, getting a dedicated IP address. Typically this resolves the connection instantly. In case your server is still having trouble after a dedicated IP address is added, please consider this setting.