建立專案
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
您必須先向 Google 提供用戶端的相關資訊,並允許存取 API,才能開始對 Google Drive Activity API 發出要求。如要完成上述操作,請使用 Google Cloud 控制台建立專案,也就是包含設定和 API 存取資訊的命名集合。
設定環境
如要開始使用 Drive Activity API,您必須在 Google Cloud 控制台中建立專案、啟用 API,並建立憑證。
建立專案
您必須擁有 Google Cloud 專案。
啟用 API
使用 Google API 前,您必須先在 Google Cloud 專案中啟用這些 API。您可以在單一 Google Cloud 專案中啟用一或多個 API。
建立憑證
您可以使用 OAuth 用戶端 ID 或服務帳戶建立憑證。詳情請參閱「建立存取憑證」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-26 (世界標準時間)。
[null,null,["上次更新時間:2025-03-26 (世界標準時間)。"],[],[],null,["# Create a project\n\nBefore you can send requests to Google Drive Activity API, you must notify Google about\nyour client and allow access to the API. You do this by using the\nGoogle Cloud console to create a project, which is a named collection of settings\nand API access information.\n\nSet up your environment\n-----------------------\n\nTo get started using Drive Activity API, you must create a project in the\nGoogle Cloud console, enable the API, and create credentials.\n\n### Create your project\n\nYou must have a [Google Cloud\nproject](../../../../workspace/guides/create-project).\n\n### Enable the API\n\nBefore using Google APIs, you need to turn them on in a Google Cloud project. You can turn on one or more APIs in a single Google Cloud project.\n\n- In the Google Cloud console, enable the Google Drive Activity API.\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=driveactivity.googleapis.com)\n\n### Create the credentials\n\nYou can create credentials using either an OAuth client ID or a service account.\nFor more information, see [Create access\ncredentials](https://developers.google.com/workspace/guides/create-credentials)."]]