login
Sign in to integrator.io with OAuth — the alternative to an API token. celigo login opens the integrator.io sign-in in your browser, or gives you a code to enter on another device, then asks GET /v1/tokenInfo which account and environment the new session reached and stores the session as the profile's one credential, bound to that environment. The session acts as you, with your own permissions in the account and environment you sign in to, and renews itself until it is revoked or expires. celigo logout revokes it.
login manages local credentials, so it is never mode-gated.
Added in celigo-cli 2026.10.1.
REST API: Authentication
celigo login [flags]Supports all global flags. --profile names the profile to sign in to, and --base-url the API host to sign in at (see Which profile it signs in).
celigo login
Sign in and store the session on a profile — --profile, else CELIGO_PROFILE, else the profile named after the account and environment the sign-in reaches, which is created if it does not exist. The active profile is never the default.
Signature
celigo login [--device] [--no-browser] [--timeout <seconds>] [--allow-account-mismatch]Arguments
None.
Flags
--device
boolean
false
Use the device authorization grant: the CLI prints a verification URL and a code, and you complete the sign-in in a browser on any device. Needs no local browser and no local port. Chosen on its own when stdin is not a terminal, or when a CI environment variable is set.
--no-browser
boolean
false
Print the authorization URL instead of opening a browser. The redirect still returns to 127.0.0.1 on this machine, so open the URL in a browser on the same machine.
--timeout <seconds>
integer
300
How long to wait for the browser sign-in, in whole seconds. The device grant waits until its code expires instead.
--allow-account-mismatch
boolean
false
Sign in even when the sign-in reaches another account or environment than the one the profile is bound to — or cannot be confirmed against it — and rebind the profile. An unconfirmed sign-in is stored unverified and clears the binding.
Example
A browser sign-in that creates its profile prints:
The device grant prints the page to visit and the code instead:
Corresponds to: the integrator.io OAuth sign-in — the authorization code grant with PKCE, or the device authorization grant — followed by GET /v1/tokenInfo with the new token, which says which account and environment the session reached.
How the sign-in runs
The browser sign-in uses the authorization code grant with PKCE, as the celigo-cli public client. The CLI listens for the redirect on the first free port among 127.0.0.1:8787, 8788, and 8789 — the redirect URIs registered for that client — opens the sign-in page, and waits. When all three ports are busy it stops before opening anything:
A sign-in not completed within --timeout stops the command; with the default 300 seconds the message is Timed out waiting for the browser sign-in after 5 minutes. Run the command again, or use --device for a headless flow.
The device grant needs neither a browser nor a port on this machine: complete the sign-in on a laptop for an SSH session, or on a phone. The CLI chooses it on its own when stdin is not a terminal, or when one of the CI variables CI, CONTINUOUS_INTEGRATION, GITHUB_ACTIONS, JENKINS_URL, GITLAB_CI, CIRCLECI, or BUILDKITE is set. The code is valid for as long as the authorization server says; once it expires, the command stops with The device code expired before the sign-in was completed. Run the command again.
Every sign-in requests the same scopes, openid profile offline_access cli:read cli:write, with a consent prompt, so the refresh token outlives the browser session. The platform does not distinguish cli:read from cli:write on a CLI session, so there is no narrower set to request: like a personal access token, the session can do what you can do. To keep a signed-in profile read-only, give it the read permission mode.
Which profile it signs in
login signs in to --profile, else CELIGO_PROFILE, else the profile named after the account and environment the sign-in reaches. It never falls back to the active profile.
A named profile signs in at --base-url, else CELIGO_BASE_URL, else the profile's own base_url, else https://api.integrator.io. Without a name, login signs in at --base-url, else CELIGO_BASE_URL, else https://api.integrator.io, then asks GET /v1/tokenInfo which account and environment the session reached and names the profile <company>-<environment>:
The company is the account's company name, else the account owner's name; the environment is the environment's name.
Both are folded the same way: accents dropped, lowercase,
&asand, apostrophes dropped, and every other run of characters outsidea-zand0-9as one-, with none at either end.The company part is cut to 24 characters at a word boundary.
Acme Corp, Production
acme-corp-production
Acme Corp, Sandbox
acme-corp-sandbox
Acme Café & Bakery Supplies, Production
acme-cafe-and-bakery-production
No company name, owner Jane Doe, Production
jane-doe-production
When no profile has that name, login creates it. When one does, login signs it in again only if it is bound to the same environment and holds no API token; one bound to the same environment that holds a token is refused outright, at a terminal too. Any other collision is refused — the CLI never suffixes the name or renames another profile:
At a terminal, the CLI prints the reason and asks for another name instead — Profile name for this sign-in ('acme-corp-production' is taken): — until you type one it can use; an empty answer gives up. When GET /v1/tokenInfo fails or names no account or environment, or the account has neither a company nor an owner name, no name can be derived: the CLI asks at a terminal, and off one refuses with No profile name could be derived from this sign-in: <reason>. The new session was revoked and nothing was saved. Sign in under a name of your own: celigo login --profile <name>.
A name you choose must be one path component. A --profile name that is not one is refused before the sign-in starts; at the prompt, the CLI asks again. See Profile names.
The first profile on the machine becomes the active profile. Any other profile login creates, or names for you, is printed with how to use it:
Under profile_pin_policy = strict, which refuses that --profile, the line names only celigo profile use — a person's command to run.
The environment binding
Right after the token exchange, login asks GET /v1/tokenInfo — with the new token, at the profile's host — which environment the session reached, and records it. The identity is the environment's user (_userId) at the API host. It is kept in the config file's top-level identities map, labelled with the account id, company, and environment name, and the profile references it in its identity key (see Config file schema). The success line names the person who signed in, by name and never by email, and the environment reached:
A later sign-in into the same profile that reaches another environment — another host, or another environment user, such as the same account's sandbox — is refused before anything is stored, and its new session is revoked:
A sign-in GET /v1/tokenInfo cannot confirm — the request fails, or the answer names no account or environment — is refused the same way for a profile that is already bound: storing it would leave the old binding vouching for a session nothing has checked. --allow-account-mismatch rebinds the profile to the environment the sign-in reached, or stores an unconfirmed session unverified and clears the binding; a note: on stderr says which. A profile that records no environment stores an unconfirmed session with a warning, and records no identity from it. The binding survives logout, so the next sign-in into the profile is held to it.
One credential per profile
A profile holds one credential: its OAuth session or its API token, never both. login refuses a profile that stores an API token, before the browser opens:
--token and CELIGO_API_TOKEN still win over a stored session. When the variable is set, login says so on stderr: note: CELIGO_API_TOKEN is set in this environment and wins over profile 'acme-corp-production''s sign-in until it is unset.
A profile login creates has the default permission mode, full. To create a read-only signed-in profile, run celigo profile add <name> --login --mode read.
Session renewal
A session renews itself before its access token expires, and once more when the API refuses the token — a 401, or a 400 that refuses the token itself (an invalid_token challenge or error code, or Bearer Authentication Failed). Renewal holds a lock, ~/.celigo/oauth.lock, so celigo commands running in parallel never spend one refresh token twice. When renewal fails, the command says why:
The authorization server refused the refresh token — it expired or was revoked:
A
celigo logoutcleared the session while the command ran. The command fails at once, without waiting for the lock or spending the revoked refresh token:The renewal failed for another reason — the authorization server is down or unreachable, or another process's renewal held the lock too long. The sign-in is kept, so retry before you sign in again:
When the API still refuses a session it has just renewed, the message quotes the API and says the session is current, since a new sign-in is unlikely to help. A profile renamed or deleted while the command ran is named as such, with celigo profile list to find its current name, rather than sent to a new sign-in. Any other 400 is reported as the API sent it.
Where the session is sent
A session is sent only to the API host it was issued for: the host of the environment the profile is bound to, else the base_url login stored with it. A --base-url, CELIGO_BASE_URL, or — for a promote target — CELIGO_TARGET_BASE_URL naming another host is refused before any request, with the way out:
A base_url edited by hand after the sign-in is refused the same way, and celigo config set base_url (or config unset base_url) to another host is refused when written. API tokens are not held to this rule: a token goes wherever --base-url or CELIGO_BASE_URL points it, so env-only CI jobs are unaffected.
Gotchas
Nothing is written until the sign-in succeeds. A new profile is created in the same write that stores its session, after
GET /v1/tokenInfohas answered, so an interrupted or failed sign-in leaves no profile behind. Aconfig.jsonthat cannot be parsed is refused before the sign-in starts (Cannot change the configuration: … cannot be read as JSON …), instead of after a sign-in the CLI would then have to revoke.A refused sign-in revokes its new session. Whatever refuses a sign-in after the token exchange — a taken name, another environment, a profile holding an API token — revokes the new tokens and leaves
config.jsonas it was. A revocation that could not be made is said on stderr (warning: could not revoke the session at <issuer> (…)), and the new tokens then stay valid on the server until they expire.Sign-ins from one browser session share one grant. The platform gives them one OAuth grant, and revoking one session's refresh token revokes the grant. So a
logout, or a refused sign-in's revocation, can also end other CLI sign-ins made from the same browser session; the CLI names those profiles on stderr (note: revoking the refused sign-in can also end other CLI sign-ins made from the same browser session, so profile 'acme-corp-sandbox' may need a new sign-in: celigo login --profile acme-corp-sandbox). For the same reason,loginnever revokes the session it replaces.CI uses an API token. The device grant waits for a person to approve the code in a browser, so an unattended job cannot complete it. Pass a token from the CI secret store in
CELIGO_API_TOKEN(withCELIGO_BASE_URL); a token wins over any sign-in on the same machine. See Authenticate.Under
profile_pin_policy = strict. A--profileorCELIGO_PROFILEnaming an existing profile other than the active one is refused with the policy's refusal, before anything is read or written. A name no profile has yet is not a pin, sologin --profile <new name>still creates a profile, and aloginwithout a name is not a pin either. Under the defaultallow, the same pin printsceligo: profile 'acme-corp-sandbox' → api.integrator.io (pinned with --profile; the active profile is 'acme-corp-production')on stderr. See Refusing a pinned profile.The session lives in the config file. It is the profile's
oauthblock in~/.celigo/config.json, which is written owner-only. Every command that prints a profile —config show,config get oauth,profile show,profile list— redacts its tokens. See Security.
Related
logout — revoke a sign-in and forget its tokens.
profile —
profile add --login,profile whoami, and the profile namesloginshares withprofile addandprofile rename.config —
config get oauth, and thebase_urlandapi_tokenrefusals on a signed-in profile.Authenticate — the two credentials side by side, and which one a command uses.
Profiles & regions — profile names, one credential per profile, and permission modes.
Last updated
Was this helpful?