Clojure wrapper for the Google Chat API (v1).
Provides idiomatic Clojure functions for managing spaces, messages, memberships, reactions, custom emojis, attachments, space events, per-user read state, per-user notification settings, and the user's sidebar sections (custom DM groupings).
Service-class naming: the Java SDK predates the rename from Hangouts Chat to Google Chat, so the service class is HangoutsChat and the scopes class is HangoutsChatScopes. The Clojure namespace uses the modern brand name.
Auth: use csl/scoped-delegated-credentials (service account + DWD) or csl/user-credentials (OAuth) with the appropriate scope from HangoutsChatScopes. The Chat API supports two auth contexts:
All list functions return {:data [...] :next-page-token "..."}. :next-page-token is absent when there are no further pages.
Update semantics: functions named update-* use PATCH (partial update; require :update-mask); functions named replace-* use PUT (full replacement). Both return the updated resource.
Cards: Message.cardsV2 carries deeply-nested GoogleAppsCardV1* types. Pass cards as plain Clojure data on :cards-v2 in the message map — the JSON round-trip pattern in ->message-model handles the typed children transparently.
Push notifications: Chat uses inbound webhooks (event handlers), not Pub/Sub watches. This library does not include watch/stop endpoints — inbound events are received by an HTTP server outside this library.
All functions return {:data ...} on success or {:error ...} on failure.
Clojure wrapper for the Google Chat API (v1).
Provides idiomatic Clojure functions for managing spaces, messages,
memberships, reactions, custom emojis, attachments, space events,
per-user read state, per-user notification settings, and the user's
sidebar sections (custom DM groupings).
Service-class naming: the Java SDK predates the rename from Hangouts
Chat to Google Chat, so the service class is HangoutsChat and the
scopes class is HangoutsChatScopes. The Clojure namespace uses the
modern brand name.
Auth: use csl/scoped-delegated-credentials (service account + DWD) or
csl/user-credentials (OAuth) with the appropriate scope from
HangoutsChatScopes. The Chat API supports two auth contexts:
- User context — OAuth 2.0 with chat.* scopes.
- App/bot context — service account with chat.bot or chat.app.* scopes.
Both yield GoogleCredentials, so chat-client accepts either.
All list functions return {:data [...] :next-page-token "..."}.
:next-page-token is absent when there are no further pages.
Update semantics: functions named update-* use PATCH (partial update;
require :update-mask); functions named replace-* use PUT (full
replacement). Both return the updated resource.
Cards: Message.cardsV2 carries deeply-nested GoogleAppsCardV1* types.
Pass cards as plain Clojure data on :cards-v2 in the message map —
the JSON round-trip pattern in ->message-model handles the typed
children transparently.
Push notifications: Chat uses inbound webhooks (event handlers), not
Pub/Sub watches. This library does not include watch/stop endpoints —
inbound events are received by an HTTP server outside this library.
All functions return {:data ...} on success or {:error ...} on failure.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |