格式:users/{user},其中 {user} 是 People API 中的人员的 id,或 Directory API 中的用户的 id。例如,如果 People API 个人资料 ID 为 123456789,您可以使用 users/123456789 作为 name 来查找与该联系人的私信。通过用户身份验证后,您可以将电子邮件地址用作 {user} 的别名。例如 users/example@gmail.com,其中 example@gmail.com 是 Google Chat 用户的电子邮件地址。
[null,null,["最后更新时间 (UTC):2024-11-12。"],[[["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"]]