Partner API authentication: Bearer ec_live_ keys, rotation and 401 errors
Every Partner API request carries the account's secret key in the header Authorization: Bearer ec_live_…, sent from your server. Each easyCoexistence account has one key, created in the dashboard under Profile, Developers, or by asking an AI assistant to run create_api_key, and shown only once. Rotating issues a new key and ends the old one at once; a missing or wrong key gets 401 unauthorized.
The prefix every Partner API key starts with, sent on each request as Authorization: Bearer.
Keys an account holds at a time; every connection made with it belongs to that account.
Status for a missing or invalid key, with the error code unauthorized and a message naming the expected header.
Times the full key is shown, when it is created or rotated; afterwards only its first characters are visible.
How does a request authenticate?
With the key as a Bearer token in the Authorization header of every request to https://easycoexistence.com/api/v1. Nothing else is signed or scoped: the key identifies the account, and everything a request creates or reads belongs to that account. Bodies are JSON, and every error comes back as an object with a code and a message.
curl https://easycoexistence.com/api/v1/connections \
-H "Authorization: Bearer $EC_API_KEY"Where do you create the key?
In the dashboard or from an AI assistant, with the same result. In the dashboard, open Profile, then Developers, and press Create API key. In Claude, ChatGPT or another assistant connected to easyCoexistence's MCP server, ask it to set up the Partner API: get_partner_setup shows what is missing and create_api_key returns the key. Either way the full key appears once, so store it in your backend's secrets straight away.
Why is the key shown only once?
Because only a hash of it is stored. easyCoexistence keeps the hash to check each request, plus the key's first characters, ec_live_ and six more, so the dashboard can show which key is live and when it was made. A lost key cannot be shown again; rotating replaces it.
How do you rotate or revoke the key?
In one step, and the old key stops working at that moment, with no grace period, since a leak is the usual reason to rotate. The new key is shown once, like the first:
- Dashboard: Profile, Developers, Rotate key.
- MCP:
create_api_keywithreplace_existingset to true. Without it the tool refuses while a key exists, so a running integration is not broken by accident. - To stop all access instead, revoke: Revoke in the dashboard, or
revoke_api_keywith confirm set to true. Requests then fail until a new key is made.
What does a missing or wrong key return?
A 401 with the code unauthorized, for a request with no Authorization header, a key that does not start with ec_live_, or a key that was rotated or revoked. The message names the header it expects. When failed requests keep coming from one address, the API answers 429 rate_limited instead, with the seconds to wait before retrying.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key. Send `Authorization: Bearer ec_live_...`."
}
}What else can a valid key be refused?
A valid key authenticates the account, and the account's state still applies. These come back with the same error shape:
- 402
billing_required: no card on the account yet, so it cannot start connect sessions. - 404
not_found: the id belongs to no connection, channel or session of this account, including ones on other accounts. - 409 removed: the connection was removed, so its webhook cannot change.
- 402 suspended: the connection is suspended after a lapsed subscription; reconnect it first.
- 429
cap_reachedorrate_limited: too many open connect sessions, or too many created this hour.
Common mistakes
- Putting the key in front-end code. Anyone who opens the page can read it, create connections billed to you and fetch your customers' tokens with ?credentials=1.
- Rotating before your backend can take the new key. The old key stops at once, so every request fails with 401 until the new one is deployed.
- Creating the key in a conversation you share. create_api_key returns it in the chat, where it stays in the history, so rotate it if that conversation is shared.
- Storing the key with quotes around it. Everything after Bearer is read as the key, so a quoted value never matches and every request gets 401.
easyCoexistence gives each account one Partner API key, so your backend can connect your customers' WhatsApp numbers and their Instagram, Facebook, TikTok, YouTube and LinkedIn accounts, and more channels, then read each connection's credentials and route its events. US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.
easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.
Frequently asked questions
Can an account have more than one API key?
No. An account has one key at a time, and making a new one replaces it. Separate keys mean separate easyCoexistence accounts, each with its own connections and its own bill.
Do Partner API keys expire?
No. A key works until it is rotated or revoked, or until easyCoexistence ends it for abuse of Meta's rules.
Do my customers need my key to connect?
No. They only open the hosted connect link, which carries its own session id. The key stays on your server and is used by your backend alone.
Is the API key the same as the events signing secret?
No. The key authenticates your requests to the API. The signing secret, shown once when you set a status events URL, lets your endpoint verify the events easyCoexistence sends.
Keep reading
Connect your first channel in two minutes.
No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.
- 3 days free
- Cancel any time
- Official APIs only
- Monitored 24/7
Verified on