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.

Create a token 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. Sign in with Google.

### 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.