הפונקציה מחזירה את הצ'אט האישי הקיים עם המשתמש שצוין. אם לא נמצא מקום בצ'אט האישי, הפונקציה מחזירה את השגיאה 404 NOT_FOUND. דוגמה לכך מופיעה בקטע חיפוש צ'אט אישי.
עם אימות אפליקציה, הפונקציה מחזירה את המרחב של הצ'אט האישי בין המשתמש שצוין לבין אפליקציית Chat שבה מתבצעת הקריאה.
עם אימות משתמש, הפונקציה מחזירה את המרחב של הצ'אט הישיר בין המשתמש שצוין לבין המשתמש המאומת.
חובה. שם המשאב של המשתמש שרוצים למצוא איתו צ'אט ישיר.
הפורמט: users/{user}, כאשר {user} הוא id של האדם מ-People API, או id של המשתמש ב-Directory API. לדוגמה, אם מזהה הפרופיל ב-People API הוא 123456789, אפשר למצוא הודעה ישירה עם אותו אדם באמצעות users/123456789 כ-name. כשמתבצעת אימות כמשתמש, אפשר להשתמש בכתובת האימייל ככתובת חלופית ל-{user}. לדוגמה, users/example@gmail.com, כאשר example@gmail.com היא כתובת האימייל של המשתמש ב-Google Chat.
[[["התוכן קל להבנה","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-11-12 (שעון UTC)."],[[["Retrieves the existing direct message with a specified user or Chat app, returning a 404 error if none is found."],["Supports both app authentication and user authentication for finding direct messages."],["Requires providing the resource name of the user in the `name` query parameter using specific formats."],["Uses a `GET` HTTP request to the `https://chat.googleapis.com/v1/spaces:findDirectMessage` endpoint with gRPC Transcoding syntax."],["Needs authorization with specific OAuth scopes like `chat.spaces`, `chat.spaces.readonly`, or `chat.bot`."]]],["This outlines how to retrieve an existing direct message space with a specific user via the Chat API. Use a `GET` request to `https://chat.googleapis.com/v1/spaces:findDirectMessage`. Provide the target user's resource name in the `name` query parameter (e.g., `users/123456789`). The request body should be empty. Upon success, the response includes a `Space` resource. Requires either App or User authentication and specific OAuth scopes like `chat.spaces` or `chat.spaces.readonly`.\n"]]