Getting started
Create an API key
Create the project write key the SDKs use to send events.
Every Ferno project has its own API keys. The SDKs send events with a key as their writeKey, so you need one before you install either SDK. Only workspace admins can create keys.
Create a key#
- In the Ferno app sidebar, under Manage, open API keys.
- Choose your project from the Project menu.
- In Provision key, enter a name for where the key will run, such as
Web apporServer, then select Create API key. - Select Copy key and store it somewhere safe. Ferno shows the full key only once.
If you are setting up a new project, Continue to create API key on the Connect step opens this page for you.
Keys start with ferno_pk_. Each name can be used once per project, so give every environment its own key.
Use the key#
Keep the key out of source control and read it from an environment variable:
- Browser SDK:
VITE_FERNO_WRITE_KEY(or your bundler's equivalent). See Browser setup. - Node SDK:
FERNO_WRITE_KEY. See Node setup.
Revoke a key#
On API keys, select Revoke next to the key, then Confirm. Events sent with a revoked key are rejected, so create and deploy a replacement first.