Skip to content

Quick Start

The CLI uses OAuth with tokens stored in your OS keyring, or in a credentials file when no keyring is available.

Terminal window
# Login (opens browser, or device login when there is no browser)
webex login
# Login by approving a code from any browser
webex login --device
# Check auth status
webex auth status
# List stored accounts
webex auth list
# Switch between accounts
webex auth switch user@example.com

You can also use a token directly:

Terminal window
webex --token "$WEBEX_TOKEN" calling people list

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_TOKEN takes a personal access token, which lasts 12 hours.
  • WEBEX_REFRESH_TOKEN takes a refresh token, from which the CLI mints access tokens as needed. Log in once on your own machine and run webex auth export to print one. If it came from your own integration, also set WEBEX_CLIENT_ID and WEBEX_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.

Use read-only mode when an AI agent or script should be able to read your Webex data but not change it.

Terminal window
webex login --read-only

This 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. POST is allowed only for a fixed list of query endpoints that take their filters in the request body, such as cc search and recording queries. Webex also rejects writes because the token has no write scopes.
  • --token, $WEBEX_TOKEN, and $WEBEX_REFRESH_TOKEN are 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 serve does not register the webex_write tool.

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.

webex admin <resource> <action> [flags] # Webex Admin APIs
webex calling <resource> <action> [flags] # Webex Calling APIs
webex cc <resource> <action> [flags] # Contact Center APIs
webex device <resource> <action> [flags] # Webex Device APIs
webex meetings <resource> <action> [flags] # Webex Meetings APIs
webex messaging <resource> <action> [flags] # Webex Messaging APIs
FlagDescription
--token <token>Override authentication
--user <email>Use a specific authenticated user
--organization <orgId>Override org ID
--output json|table|csv|rawOutput format (default: json)
--debugShow HTTP request/response details
--paginateReturn 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|in1Contact Center data center for cc commands (default: the organization’s saved region, else us1)

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:

Terminal window
webex config set cc-region eu1 # the current organization
webex config set cc-region anz1 --organization <id> # another organization
webex config get cc-region

--cc-region on its own applies to one command and saves nothing.

Terminal window
# List people in the organization
webex admin people list --max 10
# List licenses
webex admin licenses list
# List roles
webex admin roles list
Terminal window
# List people
webex calling people list --max 10
# Get your own details
webex calling people get-my-own
# List locations
webex calling locations list
# List devices
webex calling devices list

CC commands auto-populate --orgid from your login:

Terminal window
# List sites
webex cc site list
# List teams
webex cc team list
# List users
webex cc users list
# List queues
webex cc contact-service-queue list
# List entry points
webex cc entry-point list
# With filtering
webex cc site list --filter='name=="Site A"'
# With pagination
webex cc entry-point list --paginate
Terminal window
# List devices
webex device devices list
# List workspaces
webex device workspaces list
Terminal window
# List meetings
webex meetings meetings list
# List recordings
webex meetings recordings list --paginate
# List transcripts
webex meetings transcripts list
Terminal window
# List rooms
webex messaging rooms list
# List messages in a room
webex messaging messages list --room-id "ROOM_ID"
# List teams
webex messaging teams list
Terminal window
# Pretty JSON (default)
webex cc site list
# Table format
webex cc site list --output=table
# CSV format
webex admin people list --output=csv
# Raw JSON
webex cc site list --output=raw
# Save to file
webex cc site list > sites.json

Use --help at any level to see available commands:

Terminal window
webex --help
webex admin --help
webex calling --help
webex cc --help
webex device --help
webex meetings --help
webex messaging --help
webex cc users --help