EirLinkEirLink

An Post rejected your API key

Almost always one setting, and it takes a minute to change.

If EirLink says An Post rejected your key, the key itself is usually fine. Nine times out of ten the account has an IP whitelist turned on, and that is what An Post is refusing.

Why it happens

EirLink creates your labels from its own servers. When a whitelist is selected in eCommHub, An Post accepts your key only from those IP addresses and turns away every other request. From EirLink's side that comes back looking exactly like a bad key, which is all we can report at the time.

The fix

  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.
  5. Save the page.
  6. 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.
This is what it should look like. Use Whitelist unticked, and An Post's own note confirming the API is reachable from any IP address.

If you cannot untick it

On some accounts the box is greyed out, or the page will not hold the change. That is set on An Post's side and only they can lift it. Email your An Post account manager and ask them to remove the IP whitelist from your eCommHub API key so it can be used from an integration. They normally have it done within 24 hours.

Something like this works:

Could you please turn off the IP whitelist on our eCommHub API key? We are connecting a shipping integration and it needs to reach the API from outside our office.

Once they confirm it is off, paste your key into EirLink again. Nothing else on your side needs to change.

Still rejected with the whitelist off

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