نظرة عامة على Gmail API
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
Gmail API هي واجهة برمجة تطبيقات RESTful يمكن استخدامها للوصول إلى صناديق البريد في Gmail وإرسال الرسائل. بالنسبة إلى معظم تطبيقات الويب، تُعدّ واجهة برمجة التطبيقات Gmail API الخيار الأفضل للوصول المصرّح به إلى بيانات Gmail الخاصة بالمستخدم، وهي مناسبة لمختلف التطبيقات، مثل:
- استخراج الرسائل وفهرستها وإنشاء نسخة احتياطية منها للقراءة فقط
- إرسال الرسائل آليًا أو آليًا
- نقل حساب البريد الإلكتروني
- تنظيم الرسائل الإلكترونية، بما في ذلك فلترة الرسائل وترتيبها
- توحيد توقيعات الرسائل الإلكترونية في جميع أنحاء المؤسسة
في ما يلي قائمة بالمصطلحات الشائعة المستخدَمة في Gmail API:
- رسالة
- رسالة إلكترونية تحتوي على المُرسِل والمستلِمين والموضوع والنص الأساسي بعد إنشاء رسالة، لا يمكن تغييرها. يتم تمثيل الرسالة
من خلال مورد رسالة.
- سلسلة المحادثات
- مجموعة من الرسائل ذات الصلة تشكّل محادثة. في تطبيق عميل بريد إلكتروني، يتم إنشاء سلسلة محادثات عندما يردّ مستلِم واحد أو أكثر على رسالة برسالة خاصة به.
- التصنيف
آلية لتنظيم الرسائل وسلاسل المحادثات على سبيل المثال،
يمكن إنشاء التصنيف "الضرائب" وتطبيقه على جميع الرسائل وسلاسل المحادثات
المتعلقة بضرائب المستخدم. هناك نوعان من التصنيفات:
- تصنيفات النظام
- التصنيفات التي تم إنشاؤها داخليًا، مثل
INBOX
أو TRASH
أو SPAM
ولا يمكن حذف هذه التصنيفات أو تعديلها. ومع ذلك، يمكن تطبيق بعض تصنيفات النظام، مثل INBOX
، على الرسائل وسلاسل المحادثات أو إزالتها منها.
- تصنيفات المستخدمين
- التصنيفات التي أنشأها المستخدم يمكن للمستخدم أو أحد التطبيقات حذف هذه التصنيفات أو تعديلها. يتم تمثيل تصنيف المستخدم من خلال مورد تصنيف.
- مسودة
رسالة لم يتم إرسالها يمكن استبدال رسالة مضمّنة في المسودة.
يؤدي إرسال مسودة إلى حذفها تلقائيًا وإنشاء رسالة تحمل تصنيف النظام SENT
. يتم تمثيل المسودّة من خلال مرجع مسودّة.
الخطوات التالية
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Gmail API Overview\n\nThe Gmail API is a RESTful API that can be used to access Gmail mailboxes and\nsend mail. For most web applications the Gmail API is the best choice for\nauthorized access to a user's Gmail data and is suitable for various\napplications, such as:\n\n- Read-only mail extraction, indexing, and backup\n- Automated or programmatic message sending\n- Email account migration\n- Email organization including filtering and sorting of messages\n- Standardization of email signatures across an organization\n\nFollowing is a list of common terms used in the Gmail API:\n\n*Message*\n: An email message containing the sender, recipients, subject, and body. After a\n message has been created, a message cannot be changed. A message is represented\n by a [message resource](/workspace/gmail/api/reference/rest/v1/users.messages#Message).\n\n*Thread*\n: A collection of related messages forming a conversation. In an email client\n app, a thread is formed when one or more recipients respond to a message with\n their own message.\n\n*Label*\n\n: A mechanism for organizing messages and threads. For example,\n the label \"taxes\" might be created and applied to all messages and threads\n having to do with a user's taxes. There are two types of labels:\n\n *System labels*\n : Internally-created labels, such as `INBOX`, `TRASH`, or `SPAM`. These labels\n cannot be deleted or modified. However, some system labels, such as `INBOX`\n can be applied to, or removed from, messages and threads.\n\n *User labels*\n : Labels created by a user. These labels can be deleted or modified by the\n user or an application. A user label is represented by a\n [label resource](/workspace/gmail/api/reference/rest/v1/users.labels).\n\n*Draft*\n\n: An unsent message. A message contained within the draft can be replaced.\n Sending a draft automatically deletes the draft and creates a message with\n the `SENT` system label. A draft is represented by a\n [draft resource](/workspace/gmail/api/reference/rest/v1/users.drafts).\n\nNext steps\n----------\n\n- To learn about developing with Google Workspace APIs, including handling\n authentication and authorization, refer\n to [Get started as a Google Workspace developer](/workspace/guides/getstarted-overview).\n\n- To learn how to configure and run a simple Gmail API app, read the\n [Quickstarts overview](/workspace/gmail/api/guides/quickstarts-overview)."]]