gpt4 book ai didi

javascript - Google Sheets API Node 客户端库最小示例

转载 作者:行者123 更新时间:2023-11-30 19:03:07 27 4
gpt4 key购买 nike

我正在尝试关注 this指南,但是尽管我是 GCP 项目的所有者,但我无法单击步骤 1 中的按钮,因为该行为已被我的雇主禁用。在这种情况下,没有可遵循的替代说明。我尝试假设该按钮将执行的操作是:启用 Google Sheets API,然后创建和下载客户端凭据并保存为 credentials.json

但是在 code given in step 3 的第 43 行credentials.installed 被调用,但是我为我的 GCP 项目创建的客户端凭证没有“已安装” key 。我想要有关如何创建正确的 credentials.json 文件的详细说明。

最佳答案

这是 credentials.json 文件需要的样子:

{"installed":{"client_id":"XXX","project_id":"XXX","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"XXX","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}

请用您的数据替换 client_idproject_idClient secretXXX

如果您能够访问 API console ,您应该能够在那里检索这些凭据,否则请您的管理员为您做这件事。

关于javascript - Google Sheets API Node 客户端库最小示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59284034/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com