查找 Google Apis 脚本 ID

Finding Google Apis Script ID

我正在尝试使用 Google Sheet API 创建 .NET 程序。 我阅读了 this 并按照步骤操作,但是,我发现了这一行

Be sure to also replace the placeholder ENTER_YOUR_SCRIPT_ID_HERE with the script ID of your target script.

我不知道 scriptID 是什么。谁能帮我找到 ScriptID。

它将引用 https://console.developers.google.com 上的一个 ID,我只是不知道是哪个。我可以看到一个项目 ID 和一个凭证 ID。也许尝试这两个?我已经使用驱动器 API 在 .NET 中创建了应用程序,之前从未需要过 scriptID。

快速搜索得到了这些结果。

根据一般程序,here

Deploy the script project for execution by selecting Publish > Deploy as API executable. Choose a version (or create a new one) and who has access, then click Deploy. The new dialog that opens will show your script's ID, listed under "Current API ID". Make note of this ID — you will need to enter it into the application code so that the API knows which script to call. If you need to find it again later, select Publish > Deploy as API executable in the code editor to see it.

还有here

scriptId - The project key of the script to be executed. To find the project key, open the project in the script editor, then select File > Project > properties.

希望对您有所帮助。