googleapis / google-api-nodejs-client

Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
https://googleapis.dev/nodejs/googleapis/latest/
Apache License 2.0
11.36k stars 1.92k forks source link

Youtube V3 Data API - Channels.list function not fetching all the channels #2613

Open dpramani opened 3 years ago

dpramani commented 3 years ago

Hi, I am trying to get a list of youtube channels under one google account. But the api returns only one channel, although I have two channels inside my google account. Is there a way to get all the channels under one google account ? Is there any suggested workaround to this ? I have seen posts saying this is not possible, is this same now ?

Thanks

const service = google.youtube({ version: 'v3', headers: { Authorization: Bearer ${user.youtubeToken}}}); const result = service.channels.list({part: 'snippet,contentDetails,statistics', mine: true});

tmatsuo commented 3 years ago

@dpramani Where are the posts you found?

tmatsuo commented 3 years ago

Did you try managedByMe: true?

dpramani commented 3 years ago

@tmatsuo Yes I tried managedByMe: true, but got an error saying : 'Error: Access forbidden. The request may not be properly authorized.'

Some similar posts which I found are: https://issuetracker.google.com/issues/35175143 https://stackoverflow.com/questions/40781463/how-i-retrieve-the-chanel-list-using-youtube-api

bhavikfreelanace9085 commented 1 year ago

did you find the solution???