YouTube APIs – Access mutiple youtube channels (Brand Accounts) using Google Admin account

I fought with this just two days ago. Turns out it IS possible, it’s just undocumented and works a bit differently than you’d expect:

Once I create the credentials in developers console, they will be associated to the Google Account and not to the Brand Accounts.

I had the same exact misconception when I first tried (even went so far as to find out the brand account’s client_id). Turns out you don’t want to use the brand’s oauth info — you want to use your own client_id/client_secret to create a refresh token on behalf of the brand account then use that to create auth tokens.

Steps:

  1. Using your main account create an oauth client_id and client_secret via https://console.developers.google.com/apis/credentials
  2. Edit the client_id/client_secret entry you just added and add “https://developers.google.com/oauthplayground” to the “Authorized redirect URIs” at the bottom of the page.
  3. We’re going to create a refresh token the lazy way. Go to https://developers.google.com/oauthplayground/
  4. Click the gears on the top right corner and set access type to “offline”, then click “Use your own OAuth credentials” and enter the client_id and client_secret you created in step 1.
  5. Select the scopes you want to give it access to. Click authorize APIs.
  6. Here’s the magic bit: You’ll now be asked to “Choose an account”. Choose the brand account you want to access here, NOT your main account. Since you have permission to access it this’ll work fine even though you’re using your own client_id and client_secret
  7. Allow the permission access when it prompts you, then you’ll be brought back to the oauth playground.
  8. Click “Exchange authorization code for tokens”
  9. Grab the refresh token and use it like normal to generate auth tokens as needed.

Congratulations, you now have api access to the brand account!

Hope that helps.

Leave a Comment