Get YouTube Refresh Token from OAuth 2.0 Playground

Getting a YouTube (or other Google product/service) refresh token using Google’s OAuth 2.0 Playground is easy. Just follow this brief tutorial.

Go to the OAuth 2.0 Playground. Within Step 1 (Select & authorize APIs), scroll down and click on YouTube Data API v3. Then click on https://www.googleapis.com/auth/youtube.upload. Then click Authorize APIs.

OAuth 2.0 Playground YouTube Data API v3

YouTube Data API v3 YouTube.Upload

You will now be taken to a screen that will inform you Google OAuth 2.0 Playground would like to Manage your YouTube videos. Click Allow.

Google OAuth 2.0 Playground Manage YouTube Videos

Make sure the checkbox is checked for Auto-refresh the token before it expires. Then click Exchange authorization code for tokens.

Exchange Authorization Code for Tokens Auto-Refresh

To the right, below Request / Response, copy the following code and save them to a file called token.txt.

{
"access_token": "bio3.afodsdsdfoidfdfiADFfdaiorgoeediodfdd.D_beQ-o7G2b_B4Q9BaTBNQAT",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "9/faioERi534oigf-H4bw-BER43Abmir4_3Qzj49Hsdi"
}

YouTube OAuth API Access Token