Quick Start
Authentication
Section titled “Authentication”The CLI uses OAuth with tokens stored in your OS keyring, or in a credentials file when no keyring is available.
# Login (opens browser, or device login when there is no browser)webex login
# Login by approving a code from any browserwebex login --device
# Check auth statuswebex auth status
# List stored accountswebex auth list
# Switch between accountswebex auth switch user@example.comYou can also use a token directly:
webex --token "$WEBEX_TOKEN" calling people listHeadless login and unattended use
Section titled “Headless login and unattended use”Over SSH, in CI, in containers, on Linux without a display, or when no browser can be opened, webex login switches to device login. It prints a line such as Open https://… and enter 123456, plus a QR code on a terminal. Approve the code from a browser on any device. Use --browser to force the browser flow, or set WEBEX_LOGIN_MODE=device or browser. With --output json, the URL, code, and expiry are printed as JSON on stdout, so an AI agent can show them to you.
If you use your own OAuth integration, register these redirect URIs on it for device login: https://oauth-helper-{a,r,k,d}.wbx2.com/helperservice/v1/actions/device/callback (four URIs, one per letter).
When no OS keyring is available, tokens are saved in plain text to ~/.config/webex-cli/credentials.json (or $XDG_CONFIG_HOME/webex-cli/, or %APPDATA%\webex-cli\ on Windows) with mode 0600. Set WEBEX_TOKEN_STORE=keyring or file to force a store. webex auth status shows the store in use.
For CI and unattended agents, where nobody can approve a code:
WEBEX_TOKENtakes a personal access token, which lasts 12 hours.WEBEX_REFRESH_TOKENtakes a refresh token, from which the CLI mints access tokens as needed. Log in once on your own machine and runwebex auth exportto print one. If it came from your own integration, also setWEBEX_CLIENT_IDandWEBEX_CLIENT_SECRET. Refresh tokens last about 90 days from their last use. The CLI caches the access token and any rotated refresh token in the credentials file when it can write there.- For organization-level automation, use a service app or a bot token instead of a person’s login.
Token resolution order: --token > WEBEX_TOKEN > WEBEX_REFRESH_TOKEN > stored login.
Read-only mode
Section titled “Read-only mode”Use read-only mode when an AI agent or script should be able to read your Webex data but not change it.
webex login --read-onlyThis login requests only read scopes (webex config get read-only-scopes lists them) and turns on read-only mode:
- Stored logins with write access are deleted from the OS keyring and the credentials file. Other programs running as you can read both, so leaving those logins there would let them bypass read-only mode. A keyring that can’t be read, such as in a container with none, is skipped; on a host that should have one, login prints a warning.
PUT,PATCH,DELETE, and uploads are refused before they are sent.POSTis allowed only for a fixed list of query endpoints that take their filters in the request body, such ascc searchand recording queries. Webex also rejects writes because the token has no write scopes.--token,$WEBEX_TOKEN, and$WEBEX_REFRESH_TOKENare refused, because the CLI cannot check the scopes of a token it did not create.auth switch,--user, and folder defaults work only for users who logged in with--read-only.webex mcp servedoes not register thewebex_writetool.
To leave read-only mode, run webex login from an interactive terminal and confirm the prompt. The command refuses to run without a terminal, so an agent running shell commands cannot leave read-only mode on its own. Setting WEBEX_READ_ONLY=1 turns on the same checks for one process. It never turns them off.
Release builds log in through a separate read-only OAuth integration that has no write scopes. If you set your own integration with webex config set client-id, it is used instead and must have every read-only scope registered. If login fails with invalid_scope, set a list that matches your integration with webex config set read-only-scopes "<scopes>". Only read scopes are accepted.
Command Structure
Section titled “Command Structure”webex admin <resource> <action> [flags] # Webex Admin APIswebex calling <resource> <action> [flags] # Webex Calling APIswebex cc <resource> <action> [flags] # Contact Center APIswebex device <resource> <action> [flags] # Webex Device APIswebex meetings <resource> <action> [flags] # Webex Meetings APIswebex messaging <resource> <action> [flags] # Webex Messaging APIsGlobal Flags
Section titled “Global Flags”| Flag | Description |
|---|---|
--token <token> | Override authentication |
--user <email> | Use a specific authenticated user |
--organization <orgId> | Override org ID |
--output json|table|csv|raw | Output format (default: json) |
--debug | Show HTTP request/response details |
--paginate | Return every item in a list as one array, reading all its pages. Fails with incomplete list rather than return part of a list. Commands that return one object ignore it |
--cc-region us1|eu1|eu2|anz1|ca1|jp1|sg1|in1 | Contact Center data center for cc commands (default: the organization’s saved region, else us1) |
Contact Center data center
Section titled “Contact Center data center”Each organization’s Contact Center, and its AI Agent Studio, is in one data center. cc commands use, in order: --cc-region, WEBEX_CC_REGION, the region saved for the organization, then us1. Save an organization’s region once:
webex config set cc-region eu1 # the current organizationwebex config set cc-region anz1 --organization <id> # another organizationwebex config get cc-region--cc-region on its own applies to one command and saves nothing.
Admin Examples
Section titled “Admin Examples”# List people in the organizationwebex admin people list --max 10
# List licenseswebex admin licenses list
# List roleswebex admin roles listCalling Examples
Section titled “Calling Examples”# List peoplewebex calling people list --max 10
# Get your own detailswebex calling people get-my-own
# List locationswebex calling locations list
# List deviceswebex calling devices listContact Center Examples
Section titled “Contact Center Examples”CC commands auto-populate --orgid from your login:
# List siteswebex cc site list
# List teamswebex cc team list
# List userswebex cc users list
# List queueswebex cc contact-service-queue list
# List entry pointswebex cc entry-point list
# With filteringwebex cc site list --filter='name=="Site A"'
# With paginationwebex cc entry-point list --paginateDevice Examples
Section titled “Device Examples”# List deviceswebex device devices list
# List workspaceswebex device workspaces listMeetings Examples
Section titled “Meetings Examples”# List meetingswebex meetings meetings list
# List recordingswebex meetings recordings list --paginate
# List transcriptswebex meetings transcripts listMessaging Examples
Section titled “Messaging Examples”# List roomswebex messaging rooms list
# List messages in a roomwebex messaging messages list --room-id "ROOM_ID"
# List teamswebex messaging teams listOutput Formats
Section titled “Output Formats”# Pretty JSON (default)webex cc site list
# Table formatwebex cc site list --output=table
# CSV formatwebex admin people list --output=csv
# Raw JSONwebex cc site list --output=raw
# Save to filewebex cc site list > sites.jsonDiscover Commands
Section titled “Discover Commands”Use --help at any level to see available commands:
webex --helpwebex admin --helpwebex calling --helpwebex cc --helpwebex device --helpwebex meetings --helpwebex messaging --helpwebex cc users --help