A Google connection stops working when Google refuses to swap its stored refresh token for a new access token, and answers with an error such as invalid_grant. Google gives several reasons a refresh token dies: the person who connected revoked the app's access, the token went six months without being used, the app is in Testing status (its tokens last only 7 days), or the Google Account went over 100 refresh tokens for the same app, at which point Google drops the oldest one without warning. None of these can be fixed by waiting. For most of them, the fix is a fresh sign-in with the same Google login.
Every reason Google lists
Google's OAuth 2.0 overview names these causes:
- Access was revoked. The user took away the app's access to their Google Account.
- Six months without use. A refresh token that has not been used for six months expires.
- A password change, for Gmail scopes only. Changing the password ends a token with Gmail scopes. etlmcp's Google Ads and Google Analytics tokens hold none, so this cause does not apply.
- Too many live tokens. Each Google Account may hold 100 refresh tokens per OAuth client ID. A 101st token silently invalidates the oldest. A separate, larger cap applies across all clients; Google gives no number for it.
- Time-limited access. The user granted access for a limited time, and that time is over.
- Testing status. An app whose OAuth consent screen is set to external users and the Testing publishing status gets refresh tokens that expire after 7 days, unless it asks only for name, email and profile access.
- Admin policy. An admin set one of the services in the app's scopes to Restricted. The error Google returns in this case is
admin_policy_enforced. - Session length. For Google Cloud APIs, an admin's session control policy can cut sessions to as little as 1 to 24 hours; when a session runs out, calls fail with
invalid_grant, and anerror_subtypesuch asinvalid_rapttells this apart from a revoked token.
The 100-token cap and how etlmcp connects
When the connector is available, etlmcp connects Google Ads with offline access and asks Google to show the consent screen every time. Google's guide for web server apps names forcing the consent screen as the way to get a new refresh token when one already exists, so each Connect or Reconnect adds a new refresh token for that Google Account. etlmcp's Google Ads and Google Analytics 4 connectors use the same OAuth client, so tokens for both count toward the same 100 for one login.
You reach the cap only with a login that connects again and again, such as one agency login connected in many organizations. The connection made first then breaks with no change on your side. If an old Google connection fails right after someone connected the same login elsewhere, this is the likely cause. Reconnect the broken one, and keep the number of separate connections per login well below 100.
The six-month rule rarely hits an active pipeline: etlmcp refreshes the access token when it has run out or is about to, so a daily sync keeps the refresh token in use. It catches connections whose pipelines were all off for half a year.
The Testing rule is about the app, not your account: it applies only when the etlmcp server's OAuth client belongs to a Google Cloud project set to external users and still in Testing.
What etlmcp does when Google refuses
When the connector is available, etlmcp treats invalid_grant, interaction_required, login_required and consent_required from Google's token endpoint as a dead grant. A server error or a throttling answer from Google is not: that run fails as one that can pass and is tried again.
For a dead grant, etlmcp:
- marks the connection, and every source on it that is not already marked invalid, as needing a reconnect, with the reason
access was revoked or has expired; - ends the run as failed with the message that Google Ads needs reconnecting, without retrying it;
- emails your organization's owners once each time the connection falls into this state, with a link to the sources page;
- stops scheduling that source's pipelines until it is OK again, so failed runs do not pile up.
The full list of states, and what each one blocks, is on source states; the error itself is explained on needs reconnecting.
Reconnecting without losing days
Press Reconnect on the sources page and sign in with the same Google login that made the connection. etlmcp checks this, and refuses a different login with Reconnect with the original login.
After a reconnect, the next scheduled sync does not just pull its usual last 31 days. It reaches back to the window of the last earlier sync that covered the pipeline, so the days missed while the connection was down are pulled too, as far back as your plan keeps history. If the outage lasted longer than that history, a backfill cannot reach those days either.
Keeping a Google connection alive
- Connect with a company Google login that stays with the company, not the personal account of someone who might leave.
- Do not remove etlmcp's access in the Google Account's settings while pipelines depend on it.
- Avoid connecting the same login in many places: each connect uses one of its 100 tokens for etlmcp's app.
- If an admin manages your company's Google accounts, ask them not to set the Google Ads service to Restricted for etlmcp.
Deleting a Google Ads connection in etlmcp revokes its token at Google only if no other Google Ads or Google Analytics 4 connection in etlmcp holds the same login, so removing one connection does not break another.
See the Google Ads connector for what the connector pulls.