Google OAuth refresh tokens expire in 7 days in Testing mode — here's the fix
Google Cloud OAuth consent screens left in 'Testing' mode issue refresh tokens that expire after exactly seven days, a documented behavior that catches many developers off guard. A developer discovered this when an automated YouTube Shorts uploader silently failed on day seven, losing five scheduled uploads before the cause was identified. Re-authenticating only resets the seven-day clock, so the permanent fix is changing the app's publishing status from 'Testing' to 'In production'. Publishing requires verified domain ownership via Google Search Console, plus three branding fields, making the process take roughly an hour rather than a quick click. Once published and re-authenticated, tokens no longer carry the seven-day expiry and scheduled jobs can run unattended without interruption.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in