Tokens

# Generate API tokens for CLI and SDK access.

Tokens let you authenticate the CLI, SDK, and API calls. Create them in the dashboard and store them securely.

Open token manager Usage in CLI
CLI Auth

    export MAGS_API_TOKEN="your-token"

Tokens are shown once when created.

CLI usage

## Set your token and run commands.

### Environment variable

    export MAGS_API_TOKEN="your-token-here"

Add it to your shell profile if you want it to persist.

### Login flow

    mags login
    mags whoami

The CLI stores credentials in `~/.mags/config.json`.

Token list

## Manage active tokens.

Sign in to view and create tokens. Use email login or Google sign-in.

### Create a token

Token name
Expires in (days)

### New token

Save this token now — it is shown once.

`—`
Name Created Expires Status Actions
No tokens yet. — — — —

Use the token manager to create or revoke keys.