Method: users.messages.attachments.get
Belirtilen ileti ekini alır.
HTTP isteği
GET https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
Yol parametreleri
Parametreler |
userId |
string
Kullanıcının e-posta adresi. me özel değeri, kimliği doğrulanmış kullanıcıyı belirtmek için kullanılabilir.
|
messageId |
string
Eki içeren iletinin kimliği.
|
id |
string
Ekin kimliği.
|
İstek içeriği
İstek metni boş olmalıdır.
Yanıt metni
Başarılıysa yanıt metni, MessagePartBody
öğesinin bir örneğini içerir.
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamlarından birini gerektirir:
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.readonly
Daha fazla bilgi için Yetkilendirme kılavuzuna göz atın.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-09-05 UTC.
[null,null,["Son güncelleme tarihi: 2024-09-05 UTC."],[[["Retrieves a specific email attachment using the message and attachment IDs."],["Requires user authentication and authorization with specific Gmail scopes."],["Uses a simple GET request with path parameters for user, message, and attachment IDs."],["Returns the attachment data as a `MessagePartBody` object in the response."],["Request body should be empty for this operation."]]],["This document details how to retrieve a specific message attachment using a GET request. The core action involves sending a request to the provided URL, `https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}`, with the request body being empty. The URL requires three path parameters: `userId`, `messageId`, and `id`. A successful request will return a `MessagePartBody` instance, and access requires one of the listed OAuth scopes. The document also includes a \"Try it!\" feature.\n"]]