Write keys
Every source has one write key. Your code will send it with every event, so Omnibit knows which source and organization the event belongs to.
Format
Section titled “Format”A write key is omb_wk_ followed by 43 URL-safe base64 characters (32 random bytes). The fixed
prefix lets a secret scanner find leaked keys:
omb_wk_[A-Za-z0-9_-]{43}Who can see a key
Section titled “Who can see a key”| Source | Where the key lives | Shown in the console |
|---|---|---|
| Website or app (JavaScript, iOS, Android, React Native, Flutter) | In code your customers download, so anyone can read it | On the source’s page, at any time |
| Server (Node.js, Python, Go, Java, PHP, Ruby, .NET, HTTP API) | On your servers only | Once, when the source is created or its key is rotated |
Omnibit stores only a hash of a server source’s key, so nobody can read it again: not your team, and not Omnibit.
Keep a server key secret
Section titled “Keep a server key secret”- Store it in your secret manager or deployment environment, for example as
OMNIBIT_WRITE_KEY, never in source code. - Use a separate source, and so a separate key, for each server or service, so one leak doesn’t affect the others.
- If a key is lost or may have leaked, rotate it. The old key stops working at once, with no overlap, so deploy the new one right away.
Set up a source
Section titled “Set up a source”The console shows setup steps for each platform on the source’s page, under Setup. For a
website or app source they already contain its write key. For a server source they show
YOUR_WRITE_KEY: replace it with the key you stored, read from your environment.