dashboard

API keys

API keys are the secret keys that let your own servers and scripts reach your app's data. Each key is limited to the collections and what it may do with people that you give it. Create one for each job, see how it's been used, and revoke it when you no longer need it.

Steps

Overview

  1. Open Settings, then API keys, to see the keys your servers use, and what each one may reach.

    Open Settings, then API keys, to see the keys your servers use, and what each one may reach.

A new key

  1. Choose New secret key and give it a name that says what it's for.

    Choose New secret key and give it a name that says what it's for.
  2. What it may do with people acts on a person instead of a collection. Each one is off until you tick it, and a key with one of them needs no collection.

    What it may do with people acts on a person instead of a collection. Each one is off until you tick it, and a key with one of them needs no collection.
  3. Choose the collections it may reach, and whether it may write to them. A key reaches those collections, what it may do with people, and nothing else.

    Choose the collections it may reach, and whether it may write to them. A key reaches those collections, what it may do with people, and nothing else.
  4. Review shows what the key will reach before it exists, with the two lines your server needs to use it.

    Review shows what the key will reach before it exists, with the two lines your server needs to use it.
  5. Choose Create key and copy the key it shows. It is shown only once.

  6. Continue is disabled until you pick at least one collection or turn on something it may do with people, so a key that reaches nothing can't be created.

    Continue is disabled until you pick at least one collection or turn on something it may do with people, so a key that reaches nothing can't be created.

One key

  1. Open a key to see what it may reach and when it was last used.

    Open a key to see what it may reach and when it was last used.
  2. Choose Show the last 7 days to see every call made with the key in that time.

    Choose Show the last 7 days to see every call made with the key in that time.
  3. Choose Rotate to issue a new key, which stops the old one at once, or Revoke to stop it for good.

Errors

  • Give it a name you will recognise in the audit trail — two characters at least.

    The name is how you'll tell the key apart in Logs months later.

How server code uses a secret key: Keys & environments.

Was this page helpful?

Last updated