Google API客户端秘密错误(Python) [英] Google API client secrets error (Python)
问题描述
我想从Google分析中检索数据。我在控制台中创建了一个服务帐户,并使用Google的Python( hello_analytics_api_v3.py
)代码访问数据。
我已将 client_secrets.json
复制到我的文件夹中,但遇到此错误:
* SystemExit:
警告:请配置OAuth 2.0
要进行此示例运行,您需要填充client_secrets.json文件
,该文件位于:*
我该怎么办?我使用Python 2.7。
确保终端指向与您的 client_secrets相同的路径目录.json
文件。
即在您用来调用脚本的控制台中输入 pwd
,输出应该匹配 client_secrets.json
存储。
I want to retrieve data from Google analytics. I have created a service account in the console and I am using Google's Python (hello_analytics_api_v3.py
) code to access the data.
I have copied the client_secrets.json
into my folder but get this error:
*SystemExit:
WARNING: Please configure OAuth 2.0
To make this sample run you will need to populate the client_secrets.json file
found at:*
What should I do? I am using Python 2.7.
Ensure the terminal is pointing to the same path directory as your client_secrets.json
file.
i.e. type pwd
in the console you're using to call the script and the output should match the directory of where client_secrets.json
is stored.
这篇关于Google API客户端秘密错误(Python)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!