Method: users.messages.attachments.get
मैसेज अटैचमेंट के बारे में जानकारी देता है.
एचटीटीपी अनुरोध
GET https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}
यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ के पैरामीटर
पैरामीटर |
userId |
string
उपयोगकर्ता का ईमेल पता. खास वैल्यू me का इस्तेमाल, पुष्टि किए गए उपयोगकर्ता की जानकारी देने के लिए किया जा सकता है.
|
messageId |
string
उस मैसेज का आईडी जिसमें अटैचमेंट है.
|
id |
string
अटैचमेंट का आईडी.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य हिस्सा
कामयाब रहने पर, जवाब के मुख्य हिस्से में MessagePartBody
का एक इंस्टेंस शामिल किया जाता है.
अनुमति देने के दायरे
इनमें से कोई एक OAuth स्कोप ज़रूरी है:
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.readonly
ज़्यादा जानकारी के लिए, अनुमति देने से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-09-05 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 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"]]