Skip to main content

Create and manage API keys

An API key lets another system read or change data in your environment, for example your ERP, a webshop or a workflow from the Agent Hub. You make the key here and hand it to the colleague who sets up the connection.

API Keys page on the GraphQL tab with one key

Before you begin​

  • You need Backoffice access and the API Keys role. To change a key you need Editor or Owner access. To create or delete one you need Owner access.
  • Ask the colleague who builds the connection which kind of key they need and what it has to be able to do.
warning

An API key works as a password for a system. Give it only the roles the connection needs, and send it only to the colleague who needs it.

Choose the kind of key​

TabYou getUse it for
GraphQLOne keyThe GraphQL API. The examples of the Agent Hub use this one
RESTA client id and a client secretThe REST API, when the other system asks for a client id and secret

Create a GraphQL key​

  1. Go to Admin > API Keys and click New GraphQL API Key on the GraphQL tab.
  2. Type a Name that says what the key is for, for example "Workflows in n8n".
  3. Click Add Role for every role the connection needs and choose its access level. A key uses the same roles as a colleague, see Roles and permissions.
  4. Switch Active on. A new key is switched off, and a key that is off does not work.
  5. Click Save.

New GraphQL API Key dialog with a name, a channel, two roles and both switches on

The key now shows in the API Key field. Click the eye to see it and the copy icon to copy it.

FieldWhat it does
ChannelThe channel the key belongs to, when the connection is for one channel
Retrieve key only onceWith this on, the key shows only now, right after you save. Copy it before you close the dialog

Create a REST key​

  1. Click the REST tab and click New REST API Key.
  2. Type a Name and switch Active on.
  3. Click Save.

New REST API Key dialog with a name and both switches on

The Client Id and the Client Secret now show. With Retrieve client secret only once on, the secret shows only now.

Change what a key can do​

Click the key in the list. You can rename it, change its roles and access levels and switch it on or off. With "only once" on you cannot see the key or the secret again. If it is lost, make a new key and delete the old one.

Stop or delete a key​

  • To stop a key for now, open it and switch Active off. You can switch it on again.
  • To remove it, tick the key, click Delete and confirm. Every connection that still uses the key stops working, and a deleted key cannot be brought back.