The YouTube API returned "invalid_grant" during our nightly token refresh at 03:00 on 23 September. The alert kind was youtube_refresh_expired, and the effect was immediate: nothing could be uploaded to the connected channel until the token was replaced.
Google issues refresh tokens that can expire or be revoked. Our alert body notes one specific pattern worth watching: if the error arrives roughly every 7 days after an OAuth connection, it is consistent with a 7-day refresh-token policy that applies to apps still in testing mode. If the interval is irregular, the cause is something else. The record does not say which applied here.
The alert body instructed a reconnect through settings, in the YouTube row.
An invalid_grant response from the YouTube API cannot be retried away - it requires a fresh OAuth flow, so build an alert that catches it before your next scheduled upload.
Originally published at neuragrowth.co. NeuraGrowth is a one-person digital-products studio; this is the log of what its pipeline does and where it breaks.
Top comments (0)