如要指定要新增的人類成員,請新增適當 membership.member.name 的成員資格。如要新增真人使用者,請使用 users/{user},其中 {user} 可以是使用者的電子郵件地址。如果使用者位於同一個 Workspace 機構,{user} 也可以是 People API 中的 id,或是 Directory API 中的使用者 id。舉例來說,如果 user@example.com 的 People API Person 設定檔 ID 為 123456789,您可以將 membership.member.name 設為 users/user@example.com 或 users/123456789,將使用者新增至空間。
如要指定要新增的 Google 群組,請使用適當的 membership.group_member.name 新增成員。如要新增或邀請 Google 群組,請使用 groups/{group},其中 {group} 是 Cloud Identity Groups API 中群組的 id。舉例來說,您可以使用 Cloud Identity Groups 查詢 API 擷取群組電子郵件地址 group@example.com 的 ID 123456789,然後將 membership.group_member.name 設為 groups/123456789,將群組新增至即時通訊空間。系統不支援群組電子郵件,且只能在具名聊天室中新增 Google 群組做為成員。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2026-09-10 (世界標準時間)。"],[],["This content describes how to create spaces and add members in Google Chat. Key actions include: sending a `POST` request to `https://chat.googleapis.com/v1/spaces:setup` with a request body containing a `space` object (specifying space type and details), an optional `requestId`, and an array of `memberships` to define users or groups to invite. Users are identified by their email or ID, and groups by their ID. Different `spaceType` are used to create a space, a group chat or a direct message. Authorization requires specific OAuth scopes.\n"]]