Method: users.spaces.getSpaceReadState
แสดงรายละเอียดเกี่ยวกับสถานะการอ่านของผู้ใช้ภายในพื้นที่ทำงาน ซึ่งใช้ในการระบุข้อความที่อ่านแล้วและยังไม่อ่าน โปรดดูตัวอย่างที่หัวข้อดูรายละเอียดเกี่ยวกับสถานะการอ่านพื้นที่ทำงานของผู้ใช้
กำหนดให้ต้องตรวจสอบสิทธิ์ผู้ใช้ด้วยขอบเขตการอนุญาตอย่างใดอย่างหนึ่งต่อไปนี้
https://www.googleapis.com/auth/chat.users.readstate.readonly
https://www.googleapis.com/auth/chat.users.readstate
คำขอ HTTP
GET https://chat.googleapis.com/v1/{name=users/*/spaces/*/spaceReadState}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
name |
string
ต้องระบุ ชื่อทรัพยากรของสถานะการอ่านพื้นที่ทำงานที่จะดึงข้อมูล รองรับเฉพาะการดูสถานะการอ่านสำหรับผู้ใช้ที่โทรเท่านั้น หากต้องการอ้างอิงถึงผู้ใช้ที่โทรเข้ามา ให้ตั้งค่าอย่างใดอย่างหนึ่งต่อไปนี้
ชื่อแทน me เช่น users/me/spaces/{space}/spaceReadState
อีเมล Workspace ของผู้ใช้ เช่น users/[email protected]/spaces/{space}/spaceReadState
รหัสผู้ใช้ เช่น users/123456789/spaces/{space}/spaceReadState
รูปแบบ: users/{user}/spaces/{space}/spaceReadState
|
เนื้อความของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ SpaceReadState
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/chat.users.readstate
https://www.googleapis.com/auth/chat.users.readstate.readonly
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-05-07 UTC
[null,null,["อัปเดตล่าสุด 2025-05-07 UTC"],[[["This document explains how to retrieve a user's read state within a Google Chat space, indicating read and unread messages."],["You can retrieve read state information for the calling user using their user ID, email address, or the \"me\" alias."],["The request requires specific authorization scopes (`chat.users.readstate` or `chat.users.readstate.readonly`) for access."],["A successful response returns a `SpaceReadState` object containing details of the user's read state in the specified space."],["Refer to the provided links for a practical example and further details on authentication and authorization."]]],["This resource retrieves a user's read state within a specific space to determine read/unread messages. It uses a `GET` HTTP request to `https://chat.googleapis.com/v1/{name=users/*/spaces/*/spaceReadState}`, employing gRPC Transcoding syntax. The `name` path parameter, which is required, identifies the user and space. The request body must be empty, while a successful response returns a `SpaceReadState` instance. User authentication with specified OAuth scopes is necessary.\n"]]