Skip to main content

API Keys

Each crate has one API key. Anything that sends to the crate puts it in the X-API-Key header:

X-API-Key: your_api_key

A key only works for its own crate.


Find your key​

Step 1: Open Send data

Open the crate. Send data is the first section.

Step 2: Show or copy it

Under Your keys, tap Show next to API key to see it, or Copy to copy it.

The key leaves the page when you leave the crate.


Make a new key​

If your key has leaked, replace it.

Step 1: Open Settings

Open the crate and tap Settings.

Step 2: Make a new key

Under API key, tap New API key, then Make new key.

Step 3: Update your devices

Find the new key under Send data and put it in everything that sends to this crate.

caution

The old key stops working straight away. Devices using it can't send until you update them.


Keep it safe​

  • Treat the key like a password. Don't post it or share screenshots that show it.
  • Don't commit it to a code repository. Read it from an environment variable instead:
import os

KEY = os.environ["CARROTED_API_KEY"]