Skip to content

Signing in the CLI

On this page

How blocklive login works, what you choose when you approve it, how long a sign-in lasts, and where it's kept.

Before you start

Sign in

Shell
blocklive login

The terminal shows:

text
Open https://blocklive.io/cli and enter this code:

    BCDF-GHJK

Waiting for you to approve it there (two-step verification needed)…
  1. Open blocklive.io/cli in your browser and sign in to Blocklive if you aren't already.
  2. Sign in the Blocklive CLI asks for the code. Type it and press Continue.
  3. If you haven't confirmed two-step verification in the last 10 minutes, the page asks: Confirm it's you before a CLI signs in as you. Enter the code from your authenticator app, or use your security key.
  4. Check what the page shows: the code (it must match your terminal), the computer (its name, system and CLI version), and when and from which country and network the login was asked for.
  5. Choose what the sign-in can do (below) and press Approve. The page says Approved. Go back to your terminal.
  6. Within a few seconds the terminal says Signed in as <you> at <where>.

The code is never filled in for you: you type it, so a link someone sends you can't sign you in. Refuse ends the login, and the terminal says The sign-in was refused.

If the page says The Blocklive CLI needs two-step verification on your account, press Turn on two-step verification and set it up. Then open blocklive.io/cli again and enter the code: it works for 10 minutes from blocklive login.

What you choose when you approve

ChoiceWhat it means
ActWith your roles, or Through an API key you manage. Shown only if you have both.
WhereWith your roles: the organizations, teams and events the sign-in can see. Pick at least one.
ThroughWith an API key: which key. The sign-in reads what that key reads.
It may alsoCheck guests in and out, Add guests with free tickets, Edit drafts and make unpublished events. No CLI command uses these yet, so leave them unticked: the sign-in can always read.

Above Approve, a summary says in plain words what the sign-in can do, where, and when it ends. Anything it does is recorded as you.

A sign-in through an API key lists the key's events only; read one event or its attendees with the developer API and the key itself.

Login limits

LimitValue
A code works for10 minutes. Then the terminal says The code expired before it was approved. Run login again.
Codes tried, per account50 an hour, right or wrong.
Logins, per network10 a minute.

How long a sign-in lasts

A sign-in lasts at most 12 hours. It ends sooner when:

  • it isn't used for 1 hour (8 hours if all it may do besides reading is check guests in and out);
  • you run blocklive logout;
  • you sign out of Blocklive in your browser, or the browser session you approved it from ends;
  • you turn off two-step verification;
  • you no longer hold a role at any place it acts at, or the API key it acts through stops;
  • a copy of it is used on another computer.

When it has ended, commands stop with not_signed_in (exit code 3). Run blocklive login again.

The CLI renews its access every 15 minutes on its own, and each renewal can be used once. If a copy of your sign-in is used somewhere else, both stop with This sign-in was used from somewhere else, so it ended.

Check who you are

Shell
blocklive whoami
text
Sam Lee at Summer Festival, Night Market
May: read only
Ends: 2026-11-06T06:00:00.123456+00:00

May lists what it may do besides reading. A sign-in through an API key says through the key "<key name>" instead of the places.

Sign out

Shell
blocklive logout

This ends the sign-in on Blocklive too, not only on this computer. If Blocklive can't be reached, the CLI still forgets the sign-in here and says Signed out here. Blocklive could not be reached; the sign-in then ends on its own (see above).

Profiles

Keep more than one sign-in, for example one per organization, with --profile:

Shell
blocklive login --profile festival
Shell
blocklive events list --profile festival

Without --profile, commands use the profile called default. A profile name is up to 32 lower-case letters, digits, - or _.

Where the sign-in is kept

ComputerStored in
macOSThe login Keychain.
LinuxThe Secret Service (GNOME Keyring or KWallet), through secret-tool.
OtherOnly with --insecure-storage: a file readable by you only.

Without a keychain or --insecure-storage, blocklive login stops with No keychain here to keep your sign-in. Which address each profile uses is kept in ~/.config/blocklive/config.json, or under $XDG_CONFIG_HOME/blocklive.

The CLI never prints the sign-in's tokens, and there's no environment variable for them. For a script that runs unattended, use an API key with the developer API instead.