Paste this error into Google and you’ll find a hundred guesses. Here’s the fast path that actually works for Mailchimp for WordPress (MC4WP): 401 means Mailchimp rejected your credentials—most often a revoked/wrong API key, a datacenter mismatch, or a key created by a user without sufficient permissions. Follow the steps below in order, and you’ll be connected in minutes.
MC4WP shows “API Request Error: 401 – API Key Invalid.” How do I fix this, step by step?
-usX) and paste it in WP Admin → MC4WP → Mailchimp, then Save.401 Unauthorized is returned when the API key is invalid, revoked, or pointing at the wrong datacenter (the -usX suffix). MC4WP simply forwards your key to Mailchimp; if Mailchimp can’t authenticate it, you’ll get this exact error.
aaaaaaaaaaaaaaaaaaaaaaaaa-us17 (note the -us17 suffix).Why this matters: Using a revoked key, a partial key (missing the suffix), or a key created by a limited‑permission user commonly triggers 401.
-usX part)Mailchimp’s base URL is determined by the datacenter in your key. If your environment forces a different API host, you’ll get 401. Verify with cURL (replace with your values):
DC=us17 # from the end of your API key
KEY="xxxxxxxxxxxxxxxxxxxxxxx-us17"
# Expect HTTP/2 200 and JSON body. 401 means the key is invalid/revoked.
curl -i -u anystring:$KEY "https://$DC.api.mailchimp.com/3.0/"
If the request succeeds here but MC4WP still shows 401, a plugin/mu‑plugin may be overriding MC4WP’s requests. Temporarily disable other Mailchimp‑related plugins and test again.
# Should return account JSON if valid
curl -s -u anystring:$KEY "https://$DC.api.mailchimp.com/3.0/" | head -c 200
/* wp-config.php */
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Check wp-content/debug.log for Mailchimp/HTTP entries and share them with your host if needed.
https://usX.api.mailchimp.com/3.0/ returns 200 JSON with Basic Auth (anystring:API_KEY).Why does the key need “-usX”? That suffix tells Mailchimp which datacenter to use; pointing at the wrong datacenter causes 401.
MC4WP says “Connected” but forms fail. Refresh lists and re‑select your Audience in each form; also ensure the key was created by an Admin user.
Could a firewall or cURL version cause 401? Network blocks usually cause timeouts/403/5xx, not 401. A 401 specifically means invalid/revoked credentials or wrong datacenter.
WP Assistant is a free tool created by Atiba Software, a WordPress design and development company located in Nashville, TN. If you need more personalized WordPress assistance let us know, and we’ll get back to you ASAP!