auth
Manage authentication, credentials, and store connections. Each store you select gets its own profile.
login
Log in to your Shoplazza account via the browser OAuth flow. Without --store-domain this is an account-only login; selecting a store with --store-domain also needs --domain or --scope (except with --uat).
shoplazza auth login [flags]
The CLI prints an authorization URL for you to open in your browser. At an interactive terminal, it asks for the store and business domains you didn't pass, and a bare auth login while you are already logged in asks before re-authenticating.
Flags
| Flag | Type | Description |
|---|---|---|
--store-domain, -s <domain> | string | Store domain to select on login (e.g. my-store.myshoplaza.com) |
--domain <domains> | StringSlice | Comma-separated business domains for scope expansion (e.g. products,orders). Available: app, billing, checkout, customers, discounts, orders, products, shop, themes, webhook, all |
--scope <scopes> | StringSlice | Comma-separated OAuth scopes (e.g. read_product,write_product) |
--merge-scopes | bool | Also re-request every previously granted scope. Login replaces the account's granted scopes, so without it a narrower re-login drops the others |
--uat <token> | string | Log in non-interactively with an existing account UAT (CI/CD); skips the browser |
--timeout <seconds> | int | Web-flow polling timeout in seconds (default: 300) |
--poll-interval <seconds> | int | Web-flow poll interval in seconds (default: 2) |
Examples
# Account-only login (no store, no scopes)
shoplazza auth login
# Login with specific domain scopes
shoplazza auth login --store-domain my-store.myshoplaza.com --domain products,orders,customers
# Add a domain's scopes and keep the ones already granted
shoplazza auth login --store-domain my-store.myshoplaza.com --domain discounts --merge-scopes
# Non-interactive login for CI/CD
shoplazza auth login --uat $SHOPLAZZA_UAT --store-domain my-store.myshoplaza.com
logout
Log out and clear all profiles and stored credentials. At an interactive terminal, the CLI asks you to confirm first.
shoplazza auth logout
status
Display current authentication state: whether you are logged in, the account, granted scopes, and every configured profile with its store and token status.
shoplazza auth status
scopes
Show the supported OAuth scopes and the account-level scopes currently granted.
shoplazza auth scopes
store use
Request a store token for --store-domain, create or reuse that store's profile, and make it the current one, without re-authenticating.
shoplazza auth store use [flags]
Flags
| Flag | Type | Description |
|---|---|---|
--store-domain, -s <domain> | string | Store domain to switch to (required) |
--scope <scopes> | StringSlice | Scopes for this store's profile (must be a subset of the account's granted scopes); empty keeps or grants the full set |
Examples
shoplazza auth store use --store-domain another-store.myshoplaza.com
# Switch and narrow the profile's scopes
shoplazza auth store use --store-domain another-store.myshoplaza.com --scope read_product,read_order