Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Google Chat

Schemesgchat://
Cargo featureservice-googlechat
Servicehttps://chat.google.com/
Body formatsmarkdown (first is the default)
Attachmentsno
Title lengthno title (merged into the body)
Body length4,000 characters
Body linesunlimited
Request throttlenone
Vendor URLs acceptedyes

URL formats

{schema}://{workspace}/{webhook_key}/{webhook_token}
{schema}://{workspace}/{webhook_key}/{webhook_token}/{thread_key}

{schema} is one of gchat://.

URL tokens

TokenMeaningTypeRequiredDefaultNotes
{thread_key}Thread Keystringnosecret
{webhook_key}Webhook Keystringyessecret
{webhook_token}Webhook Tokenstringyessecret
{workspace}Workspacestringyessecret

Query parameters

ParameterMeaningTypeDefaultNotes
keyWebhook Keystringsets {webhook_key}
threadThread Keystringsets {thread_key}; also threadkey
tokenWebhook Tokenstringsets {webhook_token}
workspaceWorkspacestringsets {workspace}

The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.

Examples

Accepted URLs (tokens are fake):

gchat://workspace/key/token
gchat://workspace/key/token/thread123
gchat://workspace/key/token/thr?thread=
gchat://workspace/key/token?format=text
https://chat.googleapis.com/v1/spaces/myworkspace/messages?key=mykey&token=mytoken
gchat://?workspace=ws&key=mykey&token=mytoken
gchat://a/b/c?workspace=ws&key=my%2Bkey&token=mytoken
https://chat.googleapis.com/v1/spaces/myworkspace/messages?key=mykey&token=mytoken&threadKey=mythreadkey

Rejected URLs:

gchat://
gchat://:@/
gchat://workspace
gchat://workspace/key/

Send one from the command line:

mercurio -t 'Backup' -b 'Finished in 42s' 'gchat://workspace/key/token'

Notes

Google Chat (gchat://): messages to a Google Chat space through a webhook.