設定 Google Workspace 時,您需要將一些主機名稱加入許可清單,Google Workspace API 才能正常運作。
重要事項:
- 這項資訊如有異動,恕不另行通知。
- 如果想查詢特定產品的 API 資訊,請前往該產品的說明中心參閱相關內容。
步驟 1:開啟連線通訊埠
開啟下列通訊埠:
通訊埠 | 目的 |
---|---|
TCP 通訊埠 443 (HTTPS) | 存取驗證和 API 呼叫的主要網址 |
TCP 通訊埠 80 (HTTP) | 允許進行 CRL 和 OCSP 檢查 (見下方步驟 4) |
注意事項:
- 視您的設定和應用程式而定,您可能需要允許額外規則。
- 如果您使用的是 Microsoft Windows 用戶端,可能需要逐一為應用程式允許這些規則。詳情請參閱 Microsoft 說明文件。
步驟 2:將網址加入許可清單
有哪些新功能?- 2023 年 1 月 17 日:在 Google Workspace for Education 服務中新增嵌入式 YouTube 影片的網址
這項功能已復原。如果您將許可清單或封鎖清單更新為加入 www.youtubeeducation.com,必須改回 www.youtube.com,才能保留貴機構在 Google Workspace for Education 服務 (例如 Classroom 和簡報) 中使用 YouTube 影片的方式。
- May 2, 2022—Added URLs for Google Chat
- 2021 年 3 月 31 日:新增 Google Meet 網址並將 Google 聯絡人標示為已淘汰。
請將下列 Google Workspace API 的網址加入許可清單:
目的 | 網址 |
---|---|
驗證
詳情請參閱使用 OAuth 2.0 處理網路伺服器應用程式。 |
https://accounts.google.com/o/oauth2 https://www.googleapis.com/oauth2 https://oauth2.googleapis.com/token |
主要 API 進入點 | https://*.googleapis.com
(其中的 * 代表任何未含句點的字串) |
電子郵件 | 除了主要 API 進入點之外: https://mail.google.com/mail |
聯絡人和全域通訊清單 (GAL) | https://www.google.com/m8 |
Google Workspace Admin Settings API | https://apps-apis.google.com/a |
帳戶和登入事件 | https://www.google.com/accounts/ClientLogin https://www.google.com/accounts/ |
提示:建議您將 https://www.googleapis.com/generate_204 一併加入許可清單,這個網址可用於檢查 HTTP 狀態碼 (204)。
如要強化控制,您也可以將下列網址加入許可清單:
目的 | 網址 |
---|---|
更多驗證網址
您不必將這些網址全部加入許可清單,只要依您的設定加入所需網址即可。 |
https://accounts.google.com/o/oauth2/auth https://accounts.google.com/o/oauth2/token https://accounts.google.com/o/oauth2/v2/auth https://oauth2.googleapis.com/token https://www.googleapis.com/oauth2/v3/token https://www.googleapis.com/oauth2/v4/token https://www.googleapis.com/oauth2/v2/tokeninfo https://www.googleapis.com/oauth2/v3/tokeninfo https://accounts.google.com/o/oauth2/revoke https://accounts.youtube.com https://www.google.com https://fonts.gstatic.com https://ssl.gstatic.com https://www.gstatic.com https://*.googleusercontent.com/* |
Gmail Gmail API | https://mail.google.com/mail https://www.googleapis.com/gmail https://www.googleapis.com/upload/gmail |
Google Calendar API | https://www.googleapis.com/calendar |
Google Chat | https://chat.google.com https://mail.google.com/chat |
Google Classroom API | https://classroom.googleapis.com |
Google Contacts API
(已淘汰,建議使用 People API) |
https://www.google.com/m8/feeds |
全域通訊清單 (GAL)
Google Workspace Admin SDK Domain Shared Contacts API |
https://www.google.com/m8/feeds/gal |
Google Drive API | https://www.googleapis.com/drive https://www.googleapis.com/upload/drive |
Google Drive Activity API | https://www.googleapis.com/appsactivity |
Google Meet | https://*.googlevideo.com/* https://*.youtube-nocookie.com/* https://*.ytimg.com/* |
Google Sheets API | https://sheets.googleapis.com |
Google Slides API | https://slides.googleapis.com |
Google Tasks API | https://www.googleapis.com/tasks |
Google Workspace Admin SDK Data Transfer API | https://www.googleapis.com/admin/datatransfer |
Google Workspace Admin SDK Directory API | https://www.googleapis.com/admin/directory |
Google Workspace Admin SDK Enterprise License Manager API | https://www.googleapis.com/apps/licensing |
Google Workspace Admin SDK Groups Migration API | https://www.googleapis.com/upload/groups |
Google Workspace Admin SDK Groups Settings API | https://www.googleapis.com/groups |
Google Workspace Admin SDK Reports API | https://www.googleapis.com/admin/reports |
People API | https://people.googleapis.com |
步驟 3:查看 Google IP 位址範圍
請參閱這篇文章找出 Google IP 位址範圍。步驟 2 中指定的每個 Google 網址都可以使用 Google IP 位址。
您還可以從 Google Admin Toolbox 測試連線。
步驟 4:允許檢查
CRL 檢查憑證撤銷清單 (CRL) 會列出憑證授權單位 (CA) 在到期日前提早撤銷的數位憑證;系統不會信任這些憑證。
CRL 通常是由 CA 網站上的 HTTP (非 HTTPS) 網址傳送,您可以在憑證 X509v3 的詳細資料中看到 CRL 發布點。
以下是 Google 服務目前使用的 CRL 發布點:
- http://crl.pki.goog
- http://crls.pki.goog
詳情請參閱 Google Trust Services。
線上憑證狀態通訊協定 (OCSP) 是一種網際網路通訊協定,作用是取得 X.509 數位憑證的撤銷狀態。
Google 服務目前使用的 OCSP 發布點:http://ocsp.pki.goog
相關主題
Google、Google Workspace 與相關符號和標誌均為 Google LLC 的商標。所有其他公司名稱和產品名稱則為相關公司的商標。