Method: users.messages.send

To, Cc, और Bcc हेडर में मौजूद लोगों को चुना गया मैसेज भेजता है. ज़्यादा जानकारी के लिए, ईमेल मैसेज बनाना और भेजना लेख पढ़ें.

एचटीटीपी अनुरोध

  • मीडिया अपलोड करने के अनुरोधों के लिए, अपलोड यूआरआई:
    POST https://gmail.googleapis.com/upload/gmail/v1/users/{userId}/messages/send
  • सिर्फ़ मेटाडेटा के अनुरोधों के लिए मेटाडेटा यूआरआई:
    POST https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/send

यह यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.

पाथ पैरामीटर

पैरामीटर
userId

string

उपयोगकर्ता का ईमेल पता. me खास वैल्यू का इस्तेमाल, पुष्टि किए गए उपयोगकर्ता के बारे में बताने के लिए किया जा सकता है.

अनुरोध का मुख्य भाग

अनुरोध के मुख्य भाग में Message का उदाहरण है.

जवाब का मुख्य भाग

कामयाब रहने पर, जवाब के मुख्य हिस्से में Message का एक इंस्टेंस शामिल किया जाता है.

अनुमति पाने के लिंक

इसके लिए, इनमें से किसी एक OAuth स्कोप की ज़रूरत होती है:

  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.modify
  • https://www.googleapis.com/auth/gmail.compose
  • https://www.googleapis.com/auth/gmail.send

ज़्यादा जानकारी के लिए, अनुमति देने से जुड़ी गाइड देखें.