Chat
Chat has 8 operations in gum's generated catalog. Start with search when you know the task, use describe to inspect request fields and scopes, then dispatch through the command that matches the operation risk class.
| Count | Value |
|---|---|
| Family | Workspace communication |
| Operations | 8 |
| Risk classes | 1 destructive, 5 read, 2 write |
| Auth strategies | 8 byo_oauth |
Start here
gum search "chat"
gum describe chat.spaces.get
gum read chat.spaces.get --args '{"name":"<name>"}' --output jsonFor write-class operations, gum requires the write command and an explicit write gate:
gum describe chat.spaces.messages.create
gum write chat.spaces.messages.create --allow-write --args '{"parent":"<parent>"}'For destructive operations, run the call once for a confirmation envelope, review the target, then retry with the returned token:
gum destructive chat.spaces.messages.delete --args '{"name":"<name>"}'
gum destructive chat.spaces.messages.delete --args '{"name":"<name>"}' --confirmed --token '<confirmation_token>'Auth
Auth strategies in this service: 8 byo_oauth. Authenticate the strategy used by the operation you plan to call.
Bring-your-own OAuth
- In Google Cloud, enable Google Chat API.
- Configure the OAuth consent screen. Add your Google account as a test user when the app is still in testing mode.
- Create an OAuth client ID with application type
Desktop app. - Add the scopes this service needs to the consent screen.
- Store the client in gum:
printf '%s' "$GOOGLE_OAUTH_CLIENT_SECRET" \
| gum auth use-oauth-client --client-id "$GOOGLE_OAUTH_CLIENT_ID" --secret-stdin- Authorize this service:
gum login --service chat- Verify the grant before dispatch:
gum auth status --scopes chat.memberships.readonly,chat.messages,chat.messages.readonly,chat.spaces.readonly
gum describe chat.spaces.getScopes used by these operations:
https://www.googleapis.com/auth/chat.memberships.readonlyhttps://www.googleapis.com/auth/chat.messageshttps://www.googleapis.com/auth/chat.messages.readonlyhttps://www.googleapis.com/auth/chat.spaces.readonly
Service setup notes: Chat auth guide.
Operations
| Operation | Risk | Auth | Summary |
|---|---|---|---|
chat.spaces.get |
read |
byo_oauth |
Fetch a Chat space by resource name (spaces/AAA). |
chat.spaces.list |
read |
byo_oauth |
List the Chat spaces the caller is a member of. |
chat.spaces.members.list |
read |
byo_oauth |
List the members of a Chat space (parent=spaces/AAA). |
chat.spaces.messages.create |
write |
byo_oauth |
Post a message to a Chat space (parent=spaces/AAA; args.body.text). |
chat.spaces.messages.delete |
destructive |
byo_oauth |
Delete a Chat message by resource name. Destructive — requires confirmation per §6.1. |
chat.spaces.messages.get |
read |
byo_oauth |
Fetch a single Chat message by resource name (spaces/AAA/messages/BBB). |
chat.spaces.messages.list |
read |
byo_oauth |
List messages in a Chat space (parent=spaces/AAA). |
chat.spaces.messages.update |
write |
byo_oauth |
Update a Chat message's text/cards by resource name (requires updateMask). |
Next
- Use API workflows for search, describe, invoke, and error handling.
- Use Auth guides for service-specific Google setup.
- Use Command index for CLI flags and generated help.
