Something went wrong

Thank you for being patient! We're working hard on resolving the issue

Authentication - Lona Docs Log in

Authentication

All API access requires a personal access token (PAT). Tokens have the same permissions as your user account.

Generate a Token

  1. Go to lona.so/settings/tokens
  2. Click Create token
  3. Copy the token — it will only be shown once

Tokens start with lona_pat_ and are long-lived.

Usage

Environment variable

The recommended pattern is to store your token in an environment variable:

export LONA_ACCESS_TOKEN="lona_pat_..."

Then reference it when creating the client:

import { LonaSdk, SheetPlatform } from "@tento-lona";

const client = new LonaSdk.Client({
  accessToken: process.env.LONA_ACCESS_TOKEN,
  storage: localStorage,
  platform: SheetPlatform.TEST,
});

Direct configuration

You can also pass the token directly:

const client = new LonaSdk.Client({
  accessToken: "lona_pat_...",
  storage: localStorage,
  platform: SheetPlatform.TEST,
});

Security

  • Never commit tokens to version control. Use .env files or secret managers.
  • Tokens have the same scope as your user account — anything you can do in the app, the token can do via the API.
  • If a token is compromised, revoke it immediately at lona.so/settings/tokens.
  • Use one token per integration so you can revoke individually.

See also