Skip to Content

The Credential type of the TypeScript SDK, which credentials.list take or answer.

type Credential = {
  createdAt: number
  expiresAt: number | null
  id: string
  kind: ('password' | 'app_password')
  lastUsedAt: number | null
  name: string | null
  permittedRecipients: string[] | null
  revokedAt: number | null
  scope: ('read' | 'write' | 'send' | 'full')
  username: string
}

Fields

FieldTypeDescription
createdAtnumberCreation timestamp in epoch seconds
expiresAtnumber | nullExpiration timestamp in epoch seconds, or null for no expiry
idstringUnique credential ULID
kind('password' | 'app_password')Credential kind ('password' for main login, 'app_password' for client token)
lastUsedAtnumber | nullTimestamp when credential was last used in epoch seconds, or null
namestring | nullDescriptive name or label (e.g. 'Phone Mail App'), or null
permittedRecipientsstring[] | nullThe credential's OWN outbound recipient allowlist (exact addresses or *@domain), intersected with the identity's: both must permit. null = none of its own. Only a 'send' credential carries one
revokedAtnumber | nullTimestamp when credential was revoked in epoch seconds, or null
scope('read' | 'write' | 'send' | 'full')The credential's scope, a ladder: 'read' (list and read mail — nothing that leaves a trace), 'write' (also mark, file, label and trash — everything the store can undo), 'send' (also submit mail), 'full' (also permanent deletion, every settings and credential route, PIM collection lifecycle and sharing — the human's own session, and the default)
usernamestringLogin username or email address

Used by

MethodWhat it does
credentials.listList mailbox credentials

On this page