Method: spaces.findDirectMessage
Żądanie HTTP
GET https://chat.googleapis.com/v1/spaces:findDirectMessage
Adres URL używa składni transkodowania gRPC.
Parametry zapytania
Parametry |
name |
string
Wymagane. Nazwa zasobu użytkownika, z którym chcesz znaleźć wiadomość na czacie. Format: users/{user} , gdzie {user} to id dla osoby w interfejsie People API lub id dla użytkownika w interfejsie Directory API. Jeśli na przykład identyfikator profilu w People API to 123456789 , możesz znaleźć wiadomość bezpośrednią z tą osobą, podając users/123456789 jako name . Po zalogowaniu się jako użytkownik możesz używać tego adresu e-mail jako aliasu dla {user} . Na przykład users/example@gmail.com , gdzie example@gmail.com to adres e-mail użytkownika Google Chat.
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu Space
.
Zakresy autoryzacji
Wymaga jednego z tych zakresów OAuth:
https://www.googleapis.com/auth/chat.spaces
https://www.googleapis.com/auth/chat.spaces.readonly
https://www.googleapis.com/auth/chat.bot
Więcej informacji znajdziesz w przewodniku dotyczącym autoryzacji.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-11-12 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]