追加するユーザー メンバーを指定する場合は、適切な membership.member.name を使用してメンバーシップを追加します。人間のユーザーを追加するには、users/{user} を使用します。ここで、{user} はユーザーのメールアドレスにできます。同じ Workspace 組織内のユーザーの場合、{user} は People API のユーザーの id または Directory API のユーザーの id にすることもできます。たとえば、user@example.com の People API の個人プロファイル ID が 123456789 の場合、membership.member.name を users/user@example.com または users/123456789 に設定することで、ユーザーを Space に追加できます。
追加する Google グループを指定するには、適切な membership.group_member.name を使用してメンバーシップを追加します。Google グループを追加または招待するには、groups/{group} を使用します。ここで、{group} は Cloud Identity Groups API のグループの id です。たとえば、Cloud Identity Groups lookup API を使用して、グループメール group@example.com の ID 123456789 を取得し、membership.group_member.name を groups/123456789 に設定して、グループをスペースに追加できます。グループメールはサポートされていません。また、Google グループは名前付きスペースにメンバーとしてのみ追加できます。
省略可。このリクエストの一意の識別子。ランダムな UUID を使用することをおすすめします。既存のリクエスト ID を指定すると、新しいスペースが作成されるのではなく、その ID で作成されたスペースが返されます。同じ Chat アプリの既存のリクエスト ID を指定して、認証済みユーザーが異なると、エラーが返されます。
Google グループのメンバーシップの場合、Membership.group_member フィールドに name が入力された group を含める必要があります(形式は groups/{group})。Google グループを追加できるのは、Space.spaceType を SPACE に設定した場合のみです。
[[["わかりやすい","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"]],["最終更新日 2024-12-22 UTC。"],[[["Creates a new space in Google Chat and adds specified users or Google Groups."],["Supports creating spaces, group chats, and direct messages (DMs), including DMs with the calling app."],["Requires specifying the space type, display name (for spaces only), and memberships for users or groups to be added."],["Automatically adds the calling user to the space and does not support adding Chat apps except in DMs with the calling app."],["Requires user authentication with specific OAuth scopes for authorization."]]],["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"]]