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

How to add an additional new OAuth ClientID to read youtube data

$
0
0

I'm trying to get the private video's data from a youtube channel. There are already working OAuth credentials, but I want to create new credentials with which I can also obtain this private data. How does the youtube api understand which credentials are for my channel. Is there a setting in the youtube channel where I need to add my credentials to allow them to read this private data?I'm trying with this code:

self.credentials = google.oauth2.credentials.Credentials(token=None,                                                                 refresh_token=self.refresh_token2,                                                                 client_id=self.client_id2,                                                                 client_secret=self.client_secret2,                                                                 token_uri=self.token_uri2)self.youtube = googleapiclient.discovery.build(self.api_service_name, self.api_version, credentials=self.credentials)request = self.youtube.search().list(            part="snippet",            forMine=True,            maxResults=50,            order="date",            type="video"        )response = request.execute()

and the response is:

{"kind": "youtube#searchListResponse","etag": "PqCO86vmlUDWFiOBSqOsOZRp5jE","pageInfo": {"totalResults": 0,"resultsPerPage": 50  },"items": []}

Please help, do I need to configure something in the console/youtube to connect my credentials with the channel? :)


Viewing all articles
Browse latest Browse all 3718

Latest Images

Trending Articles



Latest Images

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