Method: spaces.spaceEvents.get
Stay organized with collections
Save and categorize content based on your preferences.
Returns an event from a Google Chat space. The event 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.
Note: The permissionSettings
field is not returned in the Space object of the Space event data for this request.
Requires user authentication with an authorization scope appropriate for reading the requested data:
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
To get an event, the authenticated user must be a member of the space.
For an example, see Get details about an event from a Google Chat space.
HTTP request
GET https://chat.googleapis.com/v1/{name=spaces/*/spaceEvents/*}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
name |
string
Required. The resource name of the space event. Format: spaces/{space}/spaceEvents/{spaceEvent}
|
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance of SpaceEvent
.
Authorization scopes
Requires one of the following OAuth scopes:
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
For more information, see the Authorization guide.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.
[null,null,["Last updated 2025-05-07 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)."]]