Gmail
Gmail OAuth for Sending Email: Scopes, Security, and CSV Workflows
Published 2026-09-20 · CSV Sender
Understand Google OAuth for Gmail send-only access, why CSV Sender requests gmail.send, and how tokens stay encrypted at rest.
Quick answer
CSV Sender connects to Gmail with OAuth 2.0 and requests the single scope https://www.googleapis.com/auth/gmail.send. That permission lets the app transmit MIME messages you already prepared in CSV rows; it does not grant read access to inbox, labels, or settings. Refresh tokens are encrypted at rest and used only by server-side workers when a queued row is due.
Why OAuth instead of passwords
Google deprecated less-safe password-based SMTP for consumer accounts and pushes third-party apps toward OAuth. OAuth gives users a consent screen listing exact permissions and allows revocation without changing the Gmail password.
For CSV Sender, OAuth separates:
- App login (Supabase magic link or Google sign-in to the product), and
- Gmail sender authorization (connecting which mailbox may send the queue).
For the full scope system and token lifecycle, see Gmail OAuth scopes, gmail.send scope, OAuth access vs refresh token, and revoke Gmail app access if you disconnect CSV Sender from Google Account settings.
The gmail.send scope explained
According to Google’s scope documentation, gmail.send allows sending email on a user’s behalf. It excludes:
- Reading message bodies or threads
- Modifying labels on incoming mail
- Full mailbox administration
That matches a prepared-message product: content lives in your CSV (email, subject, body); CSV Sender only delivers it.
Official references are listed in the frontmatter sources for this article.
Connection flow (high level)
- You click Connect Gmail in a workspace.
- Google shows the consent screen listing Send email on your behalf.
- CSV Sender stores encrypted refresh and access tokens tied to that sender.
- The scheduler claims due rows and calls Gmail API
users.messages.send.
If consent is revoked, sending stops until you reconnect—see Gmail sending stopped.
Token storage and rotation
Access tokens are short-lived; refresh tokens obtain new access tokens without prompting you every hour. CSV Sender encrypts refresh material with TOKEN_ENCRYPTION_KEY (AES-256-GCM) and never exposes tokens to the browser bundle.
CSV workflow implications
Because scope is send-only:
- CSV Sender cannot auto-fix bounces by reading replies—you handle replies in Gmail normally.
- Suppression lists in CSV Sender rely on upload data and unsubscribe links you include in prepared bodies, not inbox scraping.
Pair OAuth setup with validate CSV before emailing so the queue only contains intended recipients.
FAQ
Is gmail.send the smallest scope that works?
For programmatic sending via Gmail API, gmail.send is the narrow send-focused scope Google documents for this use case.
Can I connect multiple Gmail accounts?
Yes—multiple senders per workspace (plan limits apply). This is not a workaround for Google rate limits (multiple Gmail senders).
What redirect URI does CSV Sender use?
Production: https://YOUR_DOMAIN/api/gmail/callback. Local dev uses http://localhost:3000/api/gmail/callback.
Does OAuth grant CSV Sender access to Google Drive?
No—only the Gmail send scope requested during sender connect.
How does OAuth interact with sending limits?
OAuth is authorization; Gmail sending limits still apply per mailbox.
Related reading
Sources
Related articles
Gmail
Send Gmail Without Reading Your Inbox: Send-Only OAuth Explained
Learn why CSV Sender requests gmail.send only, what Google cannot access with that scope, and how prepared CSV rows are delivered safely.
Gmail
Send Emails From CSV in Gmail
Connect Gmail to a prepared three-column CSV and send one message per row with OAuth and paced queues.
Gmail
Gmail Sending Limits: What CSV Senders Need to Know
Official Google limits for consumer Gmail and Workspace, how CSV row sends count, and why quotas change over time.
CSV Email
How to Send Emails From a CSV File
Compare manual copy-paste, mail merge add-ons, and prepared-message CSV workflows so you can send one finished email per row without merge tags.
Permalink: http://localhost:3000/blog/gmail-oauth-email-sending