Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3722

Youtube API Analytics Reports

$
0
0

I'm using YouTube Analytics API to extract some channels information using something like:

result = execute_api_request(    youtubeAnalytics.reports().query,    ids="channel==" + channel_id,    startDate='2023-11-01',    endDate=today,    metrics='views,likes,subscribersGained,estimatedMinutesWatched,averageViewDuration,shares',    dimensions='day,creatorContentType',    sort='day'

but I want to get reports from more than one channel and I can't figure out how to authorize more than one channel with oauth.

Authorization code:

SCOPES = ["https://www.googleapis.com/auth/yt-analytics.readonly"]API_SERVICE_NAME = "youtubeAnalytics"API_VERSION = "v2"CLIENT_SECRETS_FILE = "client_secret_2.json"def get_service():    flow = InstalledAppFlow.from_client_secrets_file(CLIENT_SECRETS_FILE, SCOPES)    credentials = flow.run_local_server()    return build(API_SERVICE_NAME, API_VERSION, credentials = credentials)

Viewing all articles
Browse latest Browse all 3722

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>