Liking cljdoc? Tell your friends :D

goog.workspace.gmail

Clojure wrapper for the Gmail API (v1).

Provides idiomatic Clojure functions for reading, sending, and managing email in Gmail — messages, threads, labels, and drafts.

Auth: use csl/scoped-delegated-credentials or csl/user-credentials with the appropriate scope:

  • GmailScopes/GMAIL_READONLY (read-only access to messages and labels)
  • GmailScopes/GMAIL_SEND (send messages only)
  • GmailScopes/GMAIL_COMPOSE (create, read, update, and delete drafts; send)
  • GmailScopes/GMAIL_MODIFY (all read/write except permanent delete)
  • GmailScopes/GMAIL_LABELS (manage labels only)
  • GmailScopes/MAIL_GOOGLE_COM (full access including permanent delete)

All functions take a user-id parameter (typically "me" for the authenticated user). Service accounts with domain-wide delegation may pass a user's email address instead.

Enum options (e.g. :format) accept kebab-case keywords that are coerced internally (:full -> "FULL", :message-added -> "MESSAGE_ADDED").

All list functions return {:data [...] :next-page-token "..."}; the caller is responsible for pagination by passing :page-token from one call to the next. :next-page-token is absent when there are no further pages.

All functions return {:data ...} on success or {:error ...} on failure.

Clojure wrapper for the Gmail API (v1).

Provides idiomatic Clojure functions for reading, sending, and managing
email in Gmail — messages, threads, labels, and drafts.

Auth: use csl/scoped-delegated-credentials or csl/user-credentials with
the appropriate scope:
- GmailScopes/GMAIL_READONLY  (read-only access to messages and labels)
- GmailScopes/GMAIL_SEND      (send messages only)
- GmailScopes/GMAIL_COMPOSE   (create, read, update, and delete drafts; send)
- GmailScopes/GMAIL_MODIFY    (all read/write except permanent delete)
- GmailScopes/GMAIL_LABELS    (manage labels only)
- GmailScopes/MAIL_GOOGLE_COM (full access including permanent delete)

All functions take a user-id parameter (typically "me" for the
authenticated user). Service accounts with domain-wide delegation may
pass a user's email address instead.

Enum options (e.g. :format) accept kebab-case keywords that are coerced
internally (:full -> "FULL", :message-added -> "MESSAGE_ADDED").

All list functions return {:data [...] :next-page-token "..."}; the caller
is responsible for pagination by passing :page-token from one call to the next.
:next-page-token is absent when there are no further pages.

All functions return {:data ...} on success or {:error ...} on failure.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close