Skip to content

docs(imap): state the permissions a restricted API key needs - #250

Merged
duharry0915 merged 1 commit into
mainfrom
claude/imap-key-permissions
Sep 16, 2026
Merged

duharry0915 merged 1 commit into
mainfrom
claude/imap-key-permissions

Conversation

@duharry0915

Copy link
Copy Markdown
Collaborator

The IMAP/SMTP guide told users to grab an API key and said nothing about permissions. A restricted key built from a reasonable-looking set — inbox_read, message_read, message_send, drafts — silently fails to sync: LOGIN succeeds, SMTP sends, and the mailbox never updates.

That gap produced a real support case (three days of customer-side debugging) and 78 inboxes fleet-wide in the same state.

Adds a callout to Finding Your Credentials with the full required set and the symptom to recognize.

The four label_*_read grants are the non-obvious part: all of them are required because the inbox event log IMAP syncs from can carry any restricted label — including blocked and unauthenticated, which have no IMAP folder of their own and so are impossible to infer from the IMAP surface. An unrestricted key (created without a permissions object) is unaffected and works as-is; the callout says so first, so the common case isn't scared off.

Pairs with agentmail-to/agentmail-imap#44, which makes the server report this condition as missing_permission and relay the remedy to the client in an IMAP [ALERT] instead of mislabeling it as invalid credentials.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Abpr9uYtCN8W4qdG7ub3rH

The IMAP/SMTP guide told users to grab an API key and said nothing about
permissions, so a restricted key built from a reasonable-looking set
(inbox_read, message_read, message_send, drafts) silently fails to sync:
LOGIN succeeds, SMTP sends, and the mailbox never updates.

That gap produced a real support case — three days of customer-side
debugging — and 78 inboxes fleet-wide in the same state.

The four `label_*_read` grants are the non-obvious part. All of them are
required because the inbox event log IMAP syncs from can carry any
restricted label, including `blocked` and `unauthenticated`, which have
no IMAP folder of their own and are therefore impossible to guess from
the IMAP surface alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Abpr9uYtCN8W4qdG7ub3rH
@github-actions

Copy link
Copy Markdown

@duharry0915
duharry0915 merged commit 4e9feff into main Sep 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants