How to load client credentials from json file for YouTube Analytics api?

后端 未结 2 1555
[愿得一人]
[愿得一人] 2021-01-03 16:16

I want to retrieve monetization data from a friend\'s YouTube channel. I\'ve used the python code below to get the authentication credentials from him, which I then saved to

2条回答
  •  囚心锁ツ
    2021-01-03 16:42

    Solved it myself. I just needed to create the credentials object with this code:

    credentials = google.oauth2.credentials.Credentials.from_authorized_user_file(CLIENT_CREDENTIALS_FILE)
    

提交回复
热议问题