Developers · Start
Authentication
The two kinds of credentials, where to get them and how to keep them safe.
There are two kinds of credentials. Pick the one that matches what you are building.
| Connected app | API key | |
|---|---|---|
| Used for | Sending template notifications | The REST API under /api/v1 |
| Created in | Team & channels › Connected apps | Settings › API keys |
| Sent as | x-app-id and x-app-service-key headers | Authorization: Bearer sk_live_… |
| Permissions | Send notifications only | Only the scopes chosen when the key was created |
| Turn off | Deactivate the app | Revoke the key |
Connected app headers
x-app-id: acme-ordersx-app-service-key: <service-key>API key header
Authorization: Bearer sk_live_<rest-of-key>Keep credentials safe
- Call Codique only from your servers. Never put a key in a website, mobile app or anything a customer can download.
- Keep keys in your secrets manager or environment, never in source control.
- Use one connected app or API key per system, and per environment, so you can turn one off without affecting the others.
- Give an API key only the scopes it needs.
- Keys are shown once. If one is lost or exposed, deactivate or revoke it and create a new one. It stops working immediately.
Webhooks use a third kind of secret, for signatures. See Receive events.
Still stuck? Contact us with what you were doing and the exact message you saw.