osama7901
osama7901

Reputation: 1671

How to get python code samples on Youtube API V3 with API KEY only

I want to get python samples on using an API KEY to interact with Google's Youtube API V3 and get the list of videos of a specific channel, I don't want to use OAuth, I want to use API KEY credentials.

The API explorer shows both credential types but the code samples only use the OAuth method.

I want to have a python script listing a channels published videos.

Upvotes: 1

Views: 807

Answers (1)

osama7901
osama7901

Reputation: 1671

I finally figured how to do this from the documentation of the python pakcage google-api-client from here.

This is how to build the service:

youtube = googleapiclient.discovery.build(
               api_service_name, 
               api_version, 
               developerKey='YOUR_API_KEY')

and then the service will use the provided API to authenticate with Google.

Upvotes: 4

Related Questions