從 Google Chat 聊天室傳回事件。事件酬載包含變更資源的最新版本。舉例來說,如果您要求取得新訊息的事件,但該訊息稍後更新,伺服器會在事件酬載中傳回更新後的 Message
資源。
注意:這項要求的空間事件資料空間物件不會傳回 permissionSettings
欄位。
支援下列類型的驗證,並提供適當的授權範圍,可讀取所要求的資料:
應用程式驗證 (須經管理員核准) 開發人員預覽版,並使用下列其中一個授權範圍:
https://www.googleapis.com/auth/chat.app.spaces
https://www.googleapis.com/auth/chat.app.messages.readonly
https://www.googleapis.com/auth/chat.app.memberships
使用者驗證,並使用下列其中一個授權範圍:
https://www.googleapis.com/auth/chat.spaces.readonly
https://www.googleapis.com/auth/chat.spaces
https://www.googleapis.com/auth/chat.messages.readonly
https://www.googleapis.com/auth/chat.messages
https://www.googleapis.com/auth/chat.messages.reactions.readonly
https://www.googleapis.com/auth/chat.messages.reactions
https://www.googleapis.com/auth/chat.memberships.readonly
https://www.googleapis.com/auth/chat.memberships
如要取得事件,經過驗證的呼叫者必須是聊天室成員。
如需範例,請參閱「取得 Google Chat 聊天室的活動詳細資料」。
HTTP 要求
GET https://chat.googleapis.com/v1/{name=spaces/*/spaceEvents/*}
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 | |
---|---|
name |
必要欄位。聊天室事件的資源名稱。 格式: |
要求主體
要求主體必須為空白。
回應主體
如果成功,回應主體會包含 SpaceEvent
的執行例項。
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/chat.app.memberships
https://www.googleapis.com/auth/chat.app.messages.readonly
https://www.googleapis.com/auth/chat.app.spaces
https://www.googleapis.com/auth/chat.spaces
https://www.googleapis.com/auth/chat.spaces.readonly
https://www.googleapis.com/auth/chat.messages
https://www.googleapis.com/auth/chat.messages.readonly
https://www.googleapis.com/auth/chat.memberships
https://www.googleapis.com/auth/chat.memberships.readonly
https://www.googleapis.com/auth/chat.messages.reactions
https://www.googleapis.com/auth/chat.messages.reactions.readonly
詳情請參閱授權指南。