- Overview
- Get started
- Work with data
- Manage access
On this page
Related contents
Authentication and API keys
ScopeDB data APIs use workspace API keys. Send a key from a trusted, server-side client with the bearer authentication scheme:
Authorization: Bearer <api-key>
Create a key
- In ScopeDB Console for the current workspace, open Connect.
- Choose Manage keys, or open API Keys directly.
- Create a key with a name that identifies its application and environment.
- Choose the expiration offered by the Console and add useful tags when appropriate.
- Copy the secret immediately.
The complete secret is displayed once. ScopeDB cannot reveal an existing secret later; create a new key if the value is lost.
Store and use keys safely
- Keep keys in a server-side secret manager or protected local environment file.
- Do not commit keys to source control, print them in logs, or include them in support messages.
- Do not put keys in browser code, mobile applications, or other downloadable clients.
- Use a separate key for each application and environment so you can replace or revoke one without interrupting unrelated clients.
- Give keys descriptive names and tags so their owners and purpose remain clear in the Console.
Rotate a key
For a planned rotation:
- Create a replacement key and copy its one-time secret.
- Update the application's secret storage.
- Verify the application with the replacement key.
- Revoke the old key in the Console.
If a key may have been exposed, create and distribute a replacement, then revoke the exposed key as soon as possible. Revocation is not reversible.
Troubleshoot authentication
An HTTP 401 response means the ScopeDB API could not authenticate the
request. Check that:
- the request uses
Authorization: Bearer <api-key>; - the key value has no extra whitespace or quotes;
- the key has not expired or been revoked.
Do not retry a 401 with the same key. Correct the configuration or create a
replacement key first.
For a 403 response or an unexpected catalog, confirm that the API address and
API key were copied from the intended workspace.