Skip to content

YouTube API OAuth token lifetimes

Google OAuth tokens for YouTube: lifetime in expires_in, 7-day refresh tokens while the app is in Testing, 100 refresh tokens per account per client, six months unused.

Google returns an access token’s lifetime in expires_in, in seconds. Refresh tokens issued while the app’s publishing status is Testing expire in 7 days. An account can hold 100 refresh tokens per client, and a refresh token unused for six months stops working. (Checked 2026-12-05.)

Facts

Fact Official value Source Checked
Access token lifetime Returned in expires_in, in seconds YouTube Data API: OAuth 2.0 for Web Server Applications 2026-12-05
Refresh token while in Testing (days) 7 Using OAuth 2.0 to Access Google APIs 2026-12-05
Refresh tokens per account per client 100 Using OAuth 2.0 to Access Google APIs 2026-12-05
Unused refresh token Invalid after six months unused Using OAuth 2.0 to Access Google APIs 2026-12-05

Where official docs disagree

The official pages read for this page agree on every value above.

What PubNio enforces

  • PubNio refreshes a YouTube token 10 minutes before expires_in runs out.

Read the live value

  • A provider 401 becomes an auth provider error and a 403 a permission error; neither is retried.
  • YouTube error codes lists the errors PubNio returns for YouTube and how to fix each.

Limits

  • Past 100 refresh tokens for one account and client, Google invalidates the oldest; reconnecting the same channel many times can drop an earlier grant.

Sources

Type to search…

↑↓ navigate↵ selectEsc close