@ossy/gmail
v2.40.3
Published
Gmail — OAuth2 authorization and read-only access to labels and messages
Downloads
6,567
Readme
@ossy/gmail
Internal Gmail API client for Ossy. Handles OAuth2 authorization via a local credentials file and exposes read-only helpers for listing labels and fetching messages.
Usage
const { authorize, listLabels, listEmails } = require('@ossy/gmail')
const auth = await authorize()
const labels = await listLabels(auth)
console.log(labels)
const messages = await listEmails(auth, 'INBOX')
console.log(messages)Setup
Place credentials.json (downloaded from Google Cloud Console) in the working directory. On first run, authorize() will open a browser for OAuth consent and write token.json for subsequent calls.
Private
This package is internal to Ossy AB and is not published to npm.
