EirLinkEirLink

An Post refused your API key

Almost always one setting on An Post's side, not the key.

If EirLink says An Post refused your key, the key itself is usually fine. Nine times out of ten your eCommHub account has Use Whitelist switched on, and that is what An Post is refusing.

Why it happens

EirLink creates your labels from its own servers. With Use Whitelist on, An Post accepts your key only from the internet addresses on your account's list and turns every other request away. An Post now switches it on for new API accounts, and they generally keep it on.

The fix that always works

EirLink's requests to An Post come from these three addresses, and they do not change:

208.77.244.242
152.55.184.240
152.55.185.189
  1. Email your An Post account manager or An Post business support and ask them to add all three to the whitelist on your eCommHub API key.
  2. Once they confirm, paste your key into EirLink again and press Verify & save. Nothing else on your side needs to change.

Something like this works:

Could you please add these three IP addresses to the whitelist on our eCommHub API key? We create our labels through EirLink, and its requests come from these addresses.

208.77.244.242
152.55.184.240
152.55.185.189

Give An Post all three. EirLink uses each of them in turn, so with only one or two on the list some labels fail and others work. The same addresses are under the key box in Settings, then the Carriers tab, with a button to copy them.

Or untick Use Whitelist

Some older accounts let you switch it off yourself:

  1. Log in at ecommhub.anpost.com.
  2. Open the page called External Connections To The System.
  3. Find the API Settings section, just under your API key.
  4. Untick Use Whitelist, so that no whitelist is selected, and save.
  5. Come back to Settings, then the Carriers tab, paste your key again and press Verify & save.
The API Settings section in eCommHub with the Use Whitelist box unticked and a note saying the API will be accessible from any IP address.
Use Whitelist unticked, and An Post's own note confirming the API is reachable from any IP address. If the box is greyed out or will not stay unticked, use the fix above instead.

Still refused with the whitelist sorted

Rarer, but worth checking in this order:

If none of that does it, email us at contact@eirlink.ie and we will get to the bottom of it with you.

← An Post setup guideBack to EirLink