Providers
Connecting Gmail with OAuth: what you approve and why
By mailers.io team Published 5 min read
public/media/blog-gmail-oauth-setup-cover.webp There are two ways to send from a Gmail or Google Workspace mailbox through another tool. You can give the tool an SMTP login, which usually means an app password you create and paste in. Or you can let the tool sign in with Google and ask for a narrow permission. mailers.io uses the second way. This post walks through what happens when you connect a mailbox, what you are agreeing to, and what to do when it stops working.
Why OAuth instead of an app password
An app password is a long-lived secret that works for the whole mailbox protocol. Anyone who holds it can use the mailbox the way a mail client would. It does not expire on its own, it is easy to paste into the wrong tool, and it can be copied into a spreadsheet by a colleague who meant well.
With Google sign-in, mailers.io never sees your Google password and does not store an SMTP password or app password for sending. It receives a token tied to a single permission, and you can take that token away from your Google account whenever you like. The token is stored encrypted. If you were comparing “Gmail SMTP with a pasted password” against “a connection you can revoke in one click”, this is the second.
What you approve
The consent screen from Google lists three things:
- Sign-in, so Google can tell mailers.io which account approved.
- Your e-mail address, so mailers.io knows which mailbox you connected and can check its domain.
- Permission to send mail, which is the
gmail.sendscope.
gmail.send is the narrowest sending permission Gmail offers. It lets the app send messages as you. It does not let the app read, search, delete or label your mail. That is also why the connection cannot detect replies by itself: the connection never reads the mailbox. For replies and bounces you add an IMAP mailbox as a separate, optional step (more on that below).
Connect a mailbox, step by step
- In mailers.io open Sending, then Servers, then Add server, and pick Gmail / Google Workspace.
- Choose Continue to Google. You land on Google’s own page.
- Pick the mailbox and approve the three items above.
- You come back to mailers.io and the server appears in your list. Run Test the connection.
- Set a speed limit and a daily cap on the server, a little under Google’s own limits (see Gmail sending limits).
The whole flow takes a minute or two. The integration page at /integrations/gmail lists the same steps with screenshots.
One detail worth knowing: for Gmail, mailers.io checks the domain of the From address against the mailbox you connected, not the full address. Google applies its own sender rules on top, and it is Google that decides whether a given “send as” alias is allowed.
If Google asks your admin first
On Google Workspace, an admin can restrict which third-party apps may reach Google data. If that is enabled, you will not be able to approve the app yourself. The admin allows the app by its client id in the Google admin console (under the API controls) and then you try again. Give your admin the exact error you saw. If you are the admin, that is the place to look.
Personal Gmail addresses do not have an admin, so this step does not apply to them. Their limits are different, though, so read the limits post before you plan a campaign.
Bounces and replies need a separate mailbox
Sending through the Gmail API does not give mailers.io a feed of bounces. There is no provider webhook for this connection. If you want bounces and replies recorded, add an IMAP bounce or reply mailbox. App passwords are used only for that IMAP mailbox, and only if you choose to add one. This is also what lets a sequence stop when a prospect answers; see how sequences stop on reply.
If you skip this step, sending still works. You just see synchronous send errors but not later bounces from the receiving server.
When access ends
A Google refresh token stops working for a handful of reasons:
- you revoke the app in your Google account,
- the token is not used for six months,
- you change the Google password (this applies to Gmail permissions),
- the Google project that owns the app hits its limit of live refresh tokens.
Whatever the cause, it looks the same in mailers.io. The next time it needs a fresh access token, Google answers that the grant is no longer valid. mailers.io disables the server at once, takes it out of rotation and shows that Google access was revoked in the server’s panel. Mail goes to your other servers if you have them, because failover is part of the default rule on every plan.
To recover, open the server and choose Reconnect. It asks you to confirm with your password (and your two-step code if it is on) and then sends you through Google’s consent again. After that you re-enable the server. The details of safe clean-up, including how to remove access on purpose, are in revoking mailbox access safely.
Google’s limits are yours
mailers.io does not raise Google’s limits and does not pretend to know your quota. A Google Workspace user may send 2,000 messages a day, and 500 on a trial account. Sending more than that gets the mailbox blocked for up to 24 hours. Set a per-server daily cap below the number that applies to you, and spread campaigns over more than one mailbox if you need more volume, as described in rotating senders across mailboxes.
Gmail alone, or alongside other servers
A Gmail mailbox is a good fit for low-volume, person-to-person style mail: outreach from a named sender, a follow-up that should look like an ordinary message. It is not a bulk-mail pipe. A common setup is to connect several mailboxes for outreach and keep a dedicated provider such as Amazon SES or another SMTP service for newsletters and notifications. mailers.io treats them all as servers and rotates across the ones that fit. See sending servers for the list of what you can connect.
A short checklist
- Use a mailbox you own, on a domain you control.
- Approve the consent screen yourself; do not ask a colleague to click through it on your behalf.
- Test the connection before the first send.
- Set the daily cap under Google’s limit.
- Add an IMAP mailbox if you want bounces and replies.
- Know where to revoke access, and who is allowed to.
That is the whole setup. A mailbox connected this way can be disconnected in a minute, and nothing about it leaves a reusable password behind.
Questions and answers
Do I need an app password for Gmail?
Not for sending. The connection uses Google sign-in and the Gmail API. An app password is used only if you also add an optional IMAP mailbox for bounces and replies.
Can mailers.io read my inbox through this connection?
No. The sending connection asks for gmail.send, which allows sending only. It does not read the mailbox.
Why does Google show a warning or say my admin must approve the app?
A Google Workspace admin can block third-party apps. If that is your case, the admin allows the app by its client id in the Google admin console, and then you can connect.
Written by the mailers.io team. Published .