Clojure wrapper for the Google Groups Settings API (v1).
Provides idiomatic Clojure functions for reading and writing the per-group settings object (posting permissions, moderation, external-member policy, message-deny notification text, etc. — ~70 setting fields).
This is NOT the Directory API. The Directory API (goog.workspace.admin) handles group identity (email, name, members). Groups Settings handles group BEHAVIOR — what the group does once it exists. Both APIs operate on the same group; they cover different surfaces.
Auth: use csl/scoped-delegated-credentials with the appropriate scope and a super-admin impersonation target:
SCOPE NOTE
apps.groups.settings is the only scope exposed by Google for this API;
it grants read + write. There is no .readonly variant.
Model class — the Java SDK calls the per-group settings object
com.google.api.services.groupssettings.model.Groups (plural, despite
describing settings for one group). It is intentionally NOT imported to
avoid confusion with Directory's Group. Each instance describes the
settings of one group.
Enum-valued fields (:who-can-post-message, :who-can-view-group,
:message-moderation-level, ~25 others) take SCREAMING_SNAKE_CASE string
values per the Google API docs (e.g. "ALL_MEMBERS_CAN_POST",
"ANYONE_CAN_VIEW"). This wrapper does not auto-coerce keyword forms
inside body fields — pass the canonical string. The full enum-value
reference lives in Google's Groups Settings API documentation.
All functions return {:data ...} on success or {:error ...} on failure.
Clojure wrapper for the Google Groups Settings API (v1).
Provides idiomatic Clojure functions for reading and writing the
per-group settings object (posting permissions, moderation, external-member
policy, message-deny notification text, etc. — ~70 setting fields).
This is NOT the Directory API. The Directory API
(goog.workspace.admin) handles group identity (email, name, members).
Groups Settings handles group BEHAVIOR — what the group does once it
exists. Both APIs operate on the same group; they cover different surfaces.
Auth: use csl/scoped-delegated-credentials with the appropriate scope
and a super-admin impersonation target:
- GroupssettingsScopes/APPS_GROUPS_SETTINGS (read + write — only scope)
SCOPE NOTE
`apps.groups.settings` is the only scope exposed by Google for this API;
it grants read + write. There is no `.readonly` variant.
Model class — the Java SDK calls the per-group settings object
`com.google.api.services.groupssettings.model.Groups` (plural, despite
describing settings for one group). It is intentionally NOT imported to
avoid confusion with Directory's `Group`. Each instance describes the
settings of one group.
Enum-valued fields (`:who-can-post-message`, `:who-can-view-group`,
`:message-moderation-level`, ~25 others) take SCREAMING_SNAKE_CASE string
values per the Google API docs (e.g. "ALL_MEMBERS_CAN_POST",
"ANYONE_CAN_VIEW"). This wrapper does not auto-coerce keyword forms
inside body fields — pass the canonical string. The full enum-value
reference lives in Google's Groups Settings API documentation.
All functions return {:data ...} on success or {:error ...} on failure.(get-group-settings client group-unique-id & [opts])Get the per-group settings object for a group.
group-unique-id is the group's email address (e.g. "team@example.com")
or its unique numeric id.
opts:
Get the per-group settings object for a group. `group-unique-id` is the group's email address (e.g. "team@example.com") or its unique numeric id. opts: - :fields — partial response field mask string - :read-timeout-ms — per-request read timeout override - :connect-timeout-ms — per-request connect timeout override
(groupssettings-client credentials)(groupssettings-client credentials opts)Build an authenticated Groups Settings client.
credentials — a com.google.auth.oauth2.GoogleCredentials instance, typically from csl/scoped-delegated-credentials with a super-admin impersonation target and the GroupssettingsScopes/APPS_GROUPS_SETTINGS scope.
opts (optional):
Per-request opts on individual call sites override the client-level defaults.
Build an authenticated Groups Settings client. credentials — a com.google.auth.oauth2.GoogleCredentials instance, typically from csl/scoped-delegated-credentials with a super-admin impersonation target and the GroupssettingsScopes/APPS_GROUPS_SETTINGS scope. opts (optional): - :read-timeout-ms per-client default read timeout (default 120000 / 120s) - :connect-timeout-ms per-client default connect timeout (default 30000 / 30s) Per-request opts on individual call sites override the client-level defaults.
(replace-group-settings client group-unique-id settings & [opts])Fully replace the per-group settings object for a group (PUT).
Fields absent from settings revert to API defaults — unlike
update-group-settings, this is a whole-object replacement.
group-unique-id is the group's email address or unique numeric id.
settings is a Clojure map; see update-group-settings for shape.
opts:
Fully replace the per-group settings object for a group (PUT). Fields absent from `settings` revert to API defaults — unlike update-group-settings, this is a whole-object replacement. `group-unique-id` is the group's email address or unique numeric id. `settings` is a Clojure map; see update-group-settings for shape. opts: - :fields — partial response field mask string - :read-timeout-ms — per-request read timeout override - :connect-timeout-ms — per-request connect timeout override
(update-group-settings client group-unique-id settings & [opts])Partially update the per-group settings object for a group (PATCH).
Fields present in settings are updated; others are left unchanged.
group-unique-id is the group's email address or unique numeric id.
settings is a Clojure map with kebab-case keys, e.g.
{:who-can-post-message "ALL_MEMBERS_CAN_POST"
:allow-external-members "true"
:default-message-deny-notification-text "Posting denied"}
See Google's Groups Settings API documentation for the full ~70 field list and SCREAMING_SNAKE enum values per field.
opts:
Partially update the per-group settings object for a group (PATCH).
Fields present in `settings` are updated; others are left unchanged.
`group-unique-id` is the group's email address or unique numeric id.
`settings` is a Clojure map with kebab-case keys, e.g.
{:who-can-post-message "ALL_MEMBERS_CAN_POST"
:allow-external-members "true"
:default-message-deny-notification-text "Posting denied"}
See Google's Groups Settings API documentation for the full ~70 field
list and SCREAMING_SNAKE enum values per field.
opts:
- :fields — partial response field mask string
- :read-timeout-ms — per-request read timeout override
- :connect-timeout-ms — per-request connect timeout overridecljdoc 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 |