Genezio API authentication uses API keys in the X-API-Key header, or OAuth 2.0 client credentials tokens. Learn how to limit, rotate and revoke a key.
This page explains Genezio API authentication: how to send an API key, how to
limit it, and how to exchange it for an OAuth 2.0 token. Each request sends an API key. A key belongs to one account and reads the
data of that account only.
The limits of an API key: access, brands and expiration
The owner of the account sets the limits of a key when they make it.
Limit
Values
Access
Read only, or read and write. A key that reads only gets 403 insufficient_scope on a write.
Brands
All brands of the account, also the brands that you add later, or some brands. A key of some brands gets 403 brand_access_denied on each other brand.
Expiration
30, 90 or 180 days, 1 year, or never.
Give each program its own key, with the fewest brands that it needs. Then a
key that leaks reads less data, and you revoke the key of one program only.
The plan of your account gives the number of API keys that the account can hold at the same time. The API Keys page of the dashboard shows the keys that you use and the limit of your plan.
When the account holds each key that the plan permits, a new key gets 403. Revoke a key, or change the plan.
When the plan does not include API access, each key of the account gets 403 forbidden, also a key that you made before.