Method: spaces.spaceEvents.get
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Gibt ein Ereignis aus einem Google Chat-Gruppenbereich zurück. Die Ereignisnutzlast enthält die neueste Version der geänderten Ressource. Wenn Sie beispielsweise ein Ereignis für eine neue Nachricht anfordern, die Nachricht aber später aktualisiert wurde, gibt der Server die aktualisierte Message
-Ressource in der Ereignisnutzlast zurück.
Hinweis: Das Feld permissionSettings
wird in dieser Anfrage nicht im Gruppenbereichsobjekt der Gruppenbereichsereignisdaten zurückgegeben.
Erfordert eine Nutzerauthentifizierung mit einem Autorisierungsbereich, der zum Lesen der angeforderten Daten geeignet ist:
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
Damit ein Ereignis abgerufen werden kann, muss der authentifizierte Nutzer Mitglied des Gruppenbereichs sein.
Ein Beispiel finden Sie unter Details zu einem Ereignis aus einem Google Chat-Gruppenbereich abrufen.
HTTP-Anfrage
GET https://chat.googleapis.com/v1/{name=spaces/*/spaceEvents/*}
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
name |
string
Erforderlich. Der Ressourcenname des Gruppenbereichsereignisses. Format: spaces/{space}/spaceEvents/{spaceEvent}
|
Anfragetext
Der Anfragetext muss leer sein.
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von SpaceEvent
.
Autorisierungsbereiche
Erfordert einen der folgenden OAuth-Bereiche:
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
Weitere Informationen finden Sie im Leitfaden zur Autorisierung.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-25 (UTC)."],[[["\u003cp\u003eThis request returns an event from a Google Chat space, providing the most recent version of the changed resource in the payload.\u003c/p\u003e\n"],["\u003cp\u003eTo get an event, the authenticated user must be a member of the space and use the \u003ccode\u003eGET\u003c/code\u003e method with the specified URL structure.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should be empty, and a successful response returns a \u003ccode\u003eSpaceEvent\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThis action requires specific OAuth scopes related to Google Chat spaces, messages, memberships, and reactions for authorization.\u003c/p\u003e\n"]]],["This describes retrieving a Google Chat space event using a `GET` request to `https://chat.googleapis.com/v1/{name=spaces/*/spaceEvents/*}`. The `name` path parameter, in the format `spaces/{space}/spaceEvents/{spaceEvent}`, is required. The request body must be empty. Successful requests return a `SpaceEvent` instance, containing the resource's latest version. Authentication requires specific OAuth scopes, and the user must be a space member. The event payload details any resource changes within the space.\n"],null,["# Method: spaces.spaceEvents.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns an event from a Google Chat space. The [event payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated `Message` resource in the event payload.\n\nNote: The `permissionSettings` field is not returned in the Space object of the Space event data for this request.\n\nRequires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with an [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) appropriate for reading the requested data:\n\n- `https://www.googleapis.com/auth/chat.spaces.readonly`\n- `https://www.googleapis.com/auth/chat.spaces`\n- `https://www.googleapis.com/auth/chat.messages.readonly`\n- `https://www.googleapis.com/auth/chat.messages`\n- `https://www.googleapis.com/auth/chat.messages.reactions.readonly`\n- `https://www.googleapis.com/auth/chat.messages.reactions`\n- `https://www.googleapis.com/auth/chat.memberships.readonly`\n- `https://www.googleapis.com/auth/chat.memberships`\n\nTo get an event, the authenticated user must be a member of the space.\n\nFor an example, see [Get details about an event from a Google Chat space](https://developers.google.com/workspace/chat/get-space-event).\n\n### HTTP request\n\n`GET https://chat.googleapis.com/v1/{name=spaces/*/spaceEvents/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}` |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [SpaceEvent](/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/chat.spaces`\n- `https://www.googleapis.com/auth/chat.spaces.readonly`\n- `https://www.googleapis.com/auth/chat.messages`\n- `https://www.googleapis.com/auth/chat.messages.readonly`\n- `https://www.googleapis.com/auth/chat.memberships`\n- `https://www.googleapis.com/auth/chat.memberships.readonly`\n- `https://www.googleapis.com/auth/chat.messages.reactions`\n- `https://www.googleapis.com/auth/chat.messages.reactions.readonly`\n\nFor more information, see the [Authorization guide](/workspace/chat/authenticate-authorize)."]]