רשימה של המרחבים המשותפים שבהם המשתמש שמתקשר הוא חבר. הצ'אטים הקבוצתיים והצ'אטים לא מופיעים עד ששולחים את ההודעה הראשונה. דוגמה לכך מופיעה בקטע רשימת המרחבים המשותפים.
כדי לסנן לפי סוג מרחב משותף, צריך לציין ערך enum תקין, כמו SPACE או GROUP_CHAT (הערך של spaceType לא יכול להיות SPACE_TYPE_UNSPECIFIED). כדי לשלוח שאילתה לגבי כמה סוגי מרחבים משותפים, משתמשים באופרטור OR.
לדוגמה, השאילתות הבאות תקינות:
spaceType = "SPACE"
spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
שאילתות לא חוקיות נדחות על ידי השרת עם השגיאה INVALID_ARGUMENT.
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
התשובה לבקשה להצגת רשימת המרחבים המשותפים.
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל נתונים במבנה הבא:
[[["התוכן קל להבנה","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"]],["עדכון אחרון: 2025-02-27 (שעון UTC)."],[[["Lists spaces (excluding empty group chats and DMs) that the caller is a member of, supporting app and user authentication."],["Allows filtering by space type and pagination for retrieving large result sets."],["Requires specific authorization scopes related to Google Chat spaces and bots."],["Provides details on the HTTP request structure, query parameters, and expected response."],["To list all spaces within a Google Workspace organization, use the `spaces.search()` method with administrator privileges."]]],["This document details how to list spaces a user is a member of via an HTTP `GET` request to `https://chat.googleapis.com/v1/spaces`. Key actions include utilizing optional query parameters like `pageSize`, `pageToken`, and `filter` to manage results. The request body must be empty. The response body returns an array of `spaces` and a `nextPageToken` for pagination. Authorization requires specific OAuth scopes, and alternative options exist for listing spaces by Google Workspace organization.\n"]]