Method: spaces.spaceEvents.get

แสดงผลกิจกรรมจากพื้นที่ทำงานใน Google Chat เพย์โหลดเหตุการณ์มีทรัพยากรเวอร์ชันล่าสุดที่มีการเปลี่ยนแปลง เช่น หากคุณขอเหตุการณ์เกี่ยวกับข้อความใหม่ แต่มีการอัปเดตข้อความในภายหลัง เซิร์ฟเวอร์จะแสดงผลทรัพยากร Message ที่อัปเดตแล้วในเพย์โหลดเหตุการณ์

หมายเหตุ: ระบบจะไม่แสดงฟิลด์ permissionSettings ในออบเจ็กต์พื้นที่ของข้อมูลเหตุการณ์ของพื้นที่สำหรับคำขอนี้

กำหนดให้ต้องตรวจสอบสิทธิ์ผู้ใช้ด้วยขอบเขตการให้สิทธิ์ที่เหมาะสมสำหรับการอ่านข้อมูลที่ขอ

  • 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

ผู้ใช้ที่ตรวจสอบสิทธิ์ต้องเป็นสมาชิกของพื้นที่ทำงานจึงจะดูเหตุการณ์ได้

โปรดดูตัวอย่างที่หัวข้อดูรายละเอียดเกี่ยวกับกิจกรรมจากพื้นที่ทำงาน Google Chat

คำขอ HTTP

GET https://chat.googleapis.com/v1/{name=spaces/*/spaceEvents/*}

URL ใช้ไวยากรณ์การแปลง gRPC

พารามิเตอร์เส้นทาง

พารามิเตอร์
name

string

ต้องระบุ ชื่อทรัพยากรของเหตุการณ์ในช่อง

รูปแบบ: spaces/{space}/spaceEvents/{spaceEvent}

เนื้อความของคำขอ

เนื้อหาของคำขอต้องว่างเปล่า

เนื้อหาการตอบกลับ

หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ SpaceEvent

ขอบเขตการให้สิทธิ์

ต้องใช้ขอบเขต OAuth ต่อไปนี้

  • 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

ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์