Keys / Ably
ABLY_API_KEY
The Ably API key your server uses to publish and subscribe, or to issue tokens for browser and mobile clients. It has the form appId.keyId:keySecret.
- Expires
- never, unless the key is given an expiry time
- API
- create, list, update and revoke, with a Control API access token
Get it
Create one on ably.com/accounts/any/apps/any/app_keys. The steps aren't recorded yet.
Set it
ABLY_API_KEY=...
Ably's JavaScript, Python and Go SDKs don't read it; your app passes it in as key. The Ably CLI reads ABLY_API_KEY. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- On the app's API Keys page, create a new key with the same capabilities and channel limits as the old one.
- Deploy it everywhere that reads
ABLY_API_KEY. Both keys work in the meantime. - Check that nothing still uses the old key, then revoke it. Clients that use it, directly or to request tokens, are then rejected.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.