選擇 Reports API 範圍
本文件包含 Alert Center API 專屬授權和
驗證資訊閱讀這份文件之前,請務必詳閱
如需 Google Workspace 的一般驗證和授權資訊,請造訪
瞭解驗證和授權。
設定 OAuth 同意畫面並選擇範圍
定義要對使用者和應用程式審查者顯示的資訊,並註冊
供您日後發布
Reports API 範圍
如要定義授予應用程式的存取權層級,您必須找出
宣告授權範圍。授權範圍是 OAuth 2.0 URI 字串
,該資料包含 Google Workspace 應用程式名稱、應用程式存取的資料類型,以及
存取層級「範圍」是應用程式對 Google Workspace 資料提出的要求,包括
使用者Google 帳戶資料。
安裝應用程式後,系統會要求使用者驗證應用程式所使用的範圍
。一般而言,您應選擇最精確的範圍
並避免要求應用程式不需要的範圍使用者更多
清楚地將存取權授予受限制、說明範圍。
Reports API 支援以下範圍:
範圍 |
意義 |
https://www.googleapis.com/auth/admin.reports.audit.readonly |
查看 Google Workspace 網域的稽核報告 |
https://www.googleapis.com/auth/admin.reports.usage.readonly |
查看你 Google Workspace 網域的使用情況報表 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-29 (世界標準時間)。
[null,null,["上次更新時間:2024-08-29 (世界標準時間)。"],[[["This document provides authorization and authentication details specific to the Alert Center API within Google Workspace."],["Before using this API, review Google Workspace's general authentication and authorization guidelines."],["Configure OAuth 2.0 to manage access and define the information your app can access using scopes."],["Carefully select the necessary scopes for your app to limit its access to user data for security and user trust."],["The Reports API has specific scopes for viewing audit and usage reports within your Google Workspace domain."]]],["To use the Alert Center API, configure OAuth 2.0, defining scopes that specify data access levels. Choose the most narrowly focused scopes possible. Scopes are validated by users when the app is installed. Public applications using certain scopes need verification. The Reports API supports two scopes: `admin.reports.audit.readonly` for viewing audit reports, and `admin.reports.usage.readonly` for usage reports.\n"]]