【发布时间】:2020-12-29 10:28:48
【问题描述】:
我尝试在 PC 上的自动运行中使用 Python 上的 API。但我不能,因为每次程序启动时,它都会询问我授权码。 这是我的代码:
client_secret_file = "client_secret.json"
flow = google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file(
client_secrets_file, scopes)
credentials = flow.run_console()
youtube = googleapiclient.discovery.build(
api_service_name, api_version, credentials=credentials)
有什么帮助吗?谢谢
【问题讨论】:
-
您只访问自己的帐户吗?您不会访问其他用户的帐户吗?
标签: python google-api youtube-api google-oauth google-api-python-client