Search code examples
pythonyoutube-apiyoutube-data-api

Cannot get valid Credentials for Youtube v3 API


I am going through this getting-started tutorial for Youtube v3 API interaction.

I've created new sandbox project and used (copy/paste) the provided code there. Went on our GCE project, created credentials and pasted it into my sandbox project.

I keep getting the response from youtube service, saying that Credentials are Invalid.

...
File ".../python-sandbox/googleapiclient/http.py", line 842, in execute
    raise HttpError(resp, content, uri=self.uri)
HttpError: <HttpError 401 when requesting https://www.googleapis.com/youtube/v3/channels?alt=json&part=snippet%2CcontentDetails%2Cstatistics&forUsername=GoogleDevelopers returned "Invalid Credentials">

What am I missing / doing wrong?

Is this because the Credentials are created from different project than used on?


Solution

  • Youtube service was not allowed on business account