API Key (recommended)
Generate an API key from the Datagate dashboard. Keys start withdg_live_ and are shown once — store it securely.
JWT Access Token
If you authenticate via the login flow (email + 2FA), you receive a 15-minute JWT access token. This is primarily used by the dashboard, but SDKs accept it too:Authorization: Bearer <credential> header. The SDK does not handle login or token refresh — the caller provides a valid credential.
Key Management
| Action | Endpoint | Notes |
|---|---|---|
| Generate/rotate | POST /v1/auth/api-keys | Replaces any existing key. Raw key shown once. |
| Revoke | DELETE /v1/auth/api-keys | Deletes key, no replacement. |