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
GET /api/v1/integrations/accounts/{accountId}reportsneeds_reconnectwith reasontoken_expiredwhen a YouTube token can no longer be used;POST /api/v1/integrations/accounts/{accountId}/reconnectkeeps the account ID.
Related errors
- A provider 401 becomes an
authprovider error and a 403 apermissionerror; 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
-
YouTube Data API: OAuth 2.0 for Web Server Applications, checked 2026-12-05
The remaining lifetime of the access token in seconds. -
Using OAuth 2.0 to Access Google APIs, checked 2026-12-05
is issued a refresh token expiring in 7 days There is currently a limit of 100 refresh tokens per Google Account The refresh token has not been used for six months.