users

PATCH /v1/users/{usersId}/spaces/{spacesId}/spaceReadState

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

Request

  • Base URL
    https://chat.googleapis.com
  • URL
    https://chat.googleapis.com/v1/users/{usersId}/spaces/{spacesId}/spaceReadState
  • Auth
    OAuth 2 and OAuth 2
    Implicit: https://accounts.google.com/o/oauth2/auth
    Scopes: https://www.googleapis.com/auth/chat.users.readstate
    Authorization code: https://accounts.google.com/o/oauth2/auth
    Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/chat.users.readstate

Path parameters

usersIdstring required
spacesIdstring required

Query parameters

updateMaskstring google-fieldmask

Required. The field paths to update. Currently supported field paths: - last_read_time When the last_read_time is before the latest message create time, the space appears as unread in the UI. To mark the space as read, set last_read_time to any value later (larger) than the latest message create time. The last_read_time is coerced to match the latest message create time. Note that the space read state only affects the read state of messages that are visible in the space's top-level conversation. Replies in threads are unaffected by this timestamp, and instead rely on the thread read state.

Request body

lastReadTimestring google-datetime

Optional. The time when the user's space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space.

namestring

Resource name of the space read state. Format: users/{user}/spaces/{space}/spaceReadState

Response

Successful response

lastReadTimestring google-datetime

Optional. The time when the user's space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space.

namestring

Resource name of the space read state. Format: users/{user}/spaces/{space}/spaceReadState

Changes

No recorded changes to this operation across all 9 revisions of this API.