Google Reporting API v4凭据在从Google API&;下载凭据后仍然为空;服务(Python)
在寻找了很多关于如何解决我的问题之后,最后我在这里问了一个问题 我是Google Reporting API v4的新手,尝试与我的Google Analytics连接,并使用Python。我在中创建了OAuth 2.0客户端ID。然后我下载Google Reporting API v4凭据在从Google API&;下载凭据后仍然为空;服务(Python),python,google-oauth,google-analytics-api,google-reporting-api,Python,Google Oauth,Google Analytics Api,Google Reporting Api,在寻找了很多关于如何解决我的问题之后,最后我在这里问了一个问题 我是Google Reporting API v4的新手,尝试与我的Google Analytics连接,并使用Python。我在中创建了OAuth 2.0客户端ID。然后我下载client\u secret.json文件,并在这里使用教程示例 flow = client.flow_from_clientsecrets( CLIENT_SECRETS_PATH, scope=SCOPES, message
client\u secret.json
文件,并在这里使用教程示例
flow = client.flow_from_clientsecrets(
CLIENT_SECRETS_PATH, scope=SCOPES,
message=tools.message_if_missing(CLIENT_SECRETS_PATH))
# Prepare credentials, and authorize HTTP object with them.
# If the credentials don't exist or are invalid run through the native client
# flow. The Storage object will ensure that if successful the good
# credentials will get written back to a file.
storage = file.Storage('analyticsreporting.dat')
credentials = storage.get()
我的凭证为无
。我不想使用自定义登录过程来登录它,因为我希望它更具动态性
我的问题:为什么我要获得我的凭证无
,因为这些凭证看起来很好,因为我刚刚从Google API&Services下载?还有什么,我只是跳绳或做错了。此外,我还从我的Google Analytics帐户添加了VIEW\u ID
需要帮助:请帮我弄清楚。也就是说,如何使用client\u secret.json
文件并从\u clientsecrets()方法运行client.flow\u来完成凭证过程。我不想使用tools.run\u flow()
方法,因为它要求登录到帐户,而不可能与其他人共享我的Google帐户凭据