AI-generated Key Takeaways
-
This API updates a user's read state within a Google Chat space, marking messages as read or unread.
-
It requires user authentication and the
chat.users.readstate
OAuth scope for authorization. -
The request uses the PATCH method and specifies the space read state resource name in the URL path.
-
You can control which fields to update using the
updateMask
query parameter, such as setting thelastReadTime
to mark a space as read. -
The request and response bodies utilize the
SpaceReadState
object to represent the user's read state information.
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
Updates a user's read state within a space, used to identify read and unread messages. For an example, see Update a user's space read state.
Requires user authentication with the authorization scope:
https://www.googleapis.com/auth/chat.users.readstate
HTTP request
PATCH https://chat.googleapis.com/v1/{spaceReadState.name=users/*/spaces/*/spaceReadState}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
spaceReadState.name |
Resource name of the space read state. Format: |
Query parameters
Parameters | |
---|---|
updateMask |
Required. The field paths to update. Currently supported field paths:
When the To mark the space as read, set |
Request body
The request body contains an instance of SpaceReadState
.
Response body
If successful, the response body contains an instance of SpaceReadState
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/chat.users.readstate
For more information, see the Authorization guide.