使用Google API for Python-我从哪里获取client_secrets.json文件?

时间:2021-04-03 15:26:15

I am looking into using the Google API to allow users to create/ edit calendar entries in a company calendar (Google calendar) from within iCal.

我正在考虑使用Google API来允许用户在iCal中创建/编辑公司日历(Google日历)中的日历条目。

I'm following the instructions at: https://developers.google.com/api-client-library/python/auth/web-app

我按照以下说明操作:https://developers.google.com/api-client-library/python/auth/web-app

Step 2 says that I will need the application's client ID and client secret. I can see the client ID in the 'Credentials' page for my app, but I have no idea what the client secret is or where I get that from- anyone know what this is? How do I download it? Where can I get the value from to update the field?

第2步说我将需要应用程序的客户端ID和客户端密钥。我可以在我的应用程序的“凭据”页面中看到客户端ID,但我不知道客户端的秘密是什么,或者我从哪里得到 - 任何人都知道这是什么?我该如何下载?我在哪里可以获得更新字段的价值?

2 个解决方案

#1


5  

If you go to your Google developers console you should see a section titled OAuth 2.0 client IDs. Click on an entry in that list, and you will see a number of fields, including Client secret.

如果您转到Google开发人员控制台,则会看到标题为OAuth 2.0客户端ID的部分。单击该列表中的条目,您将看到许多字段,包括客户端密钥。

If you have not yet created credentials, click the Create credentials button, and follow the instructions to create new credentials, and then follow the steps outlined above to find the Client secret.

如果尚未创建凭据,请单击“创建凭据”按钮,然后按照说明创建新凭据,然后按照上述步骤查找客户端密钥。

#2


-1  

Once you create credentials, you would be able to download client_secrets.json

创建凭据后,您就可以下载client_secrets.json

#1


5  

If you go to your Google developers console you should see a section titled OAuth 2.0 client IDs. Click on an entry in that list, and you will see a number of fields, including Client secret.

如果您转到Google开发人员控制台,则会看到标题为OAuth 2.0客户端ID的部分。单击该列表中的条目,您将看到许多字段,包括客户端密钥。

If you have not yet created credentials, click the Create credentials button, and follow the instructions to create new credentials, and then follow the steps outlined above to find the Client secret.

如果尚未创建凭据,请单击“创建凭据”按钮,然后按照说明创建新凭据,然后按照上述步骤查找客户端密钥。

#2


-1  

Once you create credentials, you would be able to download client_secrets.json

创建凭据后,您就可以下载client_secrets.json