Skip to Content

Token Management

Create a service token

Get a company-wide token for server-to-server API calls and MCP.

A service token works for your whole company, not one data app. Use it to manage data apps, workspaces and dashboards through the API, and to connect an MCP client. To create guest tokens, use a data app API token instead.

Before you start

  • Your role can create API tokens. Without it, you get “You do not have permission to create tokens.”

Steps

  1. Go to Settings > Developers > Tokens.

  2. On the Service Tokens tab, select Generate service token.

  3. Enter a Name, for example Reporting backend, and an optional Description.

    Generate service token dialog with Name and Description fields
    Name the token after the service that uses it.
  4. Select Generate service token.

  5. Copy the token and save it in your secret store. You see the full token only once.

The token is in the Service Tokens list with the status Active. The list shows only its last 4 characters.

Send it as a bearer token:

curl https://api.usedatabrain.com/api/v2/data-app \
  -H "Authorization: Bearer $DATABRAIN_SERVICE_TOKEN"

Which token to use

TaskToken
Create a guest token for an embedData app API token
Create, update, list or delete data apps, and create their API tokensService token. Create data app
Workspace APIsService token. Create workspace
Connect an MCP clientService token. MCP server

Legacy API Tokens

The Legacy API Tokens tab lists old company-wide API tokens. You cannot make new ones there. New API tokens belong to a data app.

If something goes wrong

  • The API returns Invalid Service Token. You sent a data app API token to a route that needs a service token. Use a token from Settings > Developers > Tokens.
  • You lost the token. It cannot rotate itself. Rotate it as an admin with POST /api/v2/service-token/rotate-from-app. See Admin authentication flow.

On this page