نظرة عامة على Google Chat API
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تقدّم هذه الصفحة نظرة عامة حول كيفية استخدام Google Chat API والمستندات المرجعية الخاصة به.
تتضمّن واجهة Google Chat API واجهتَي gRPC وREST، بالإضافة إلى مكتبات برامج متوافقة مع كلتيهما. يمكنك اختياريًا كتابة مكتبات برامج خاصة بك تستخدم واجهة gRPC أو REST إذا لم تلبِّ مكتبات البرامج المتوفّرة احتياجاتك.
مكتبات العملاء
الطريقة المقترَحة لمعظم المطوّرين لاستدعاء Google Chat API هي استخدام مكتبات Cloud Client Libraries المتوافقة رسميًا مع لغتك المفضّلة، مثل Python أو Java أو Node.js.
إذا كنت تكتب الرموز البرمجية باستخدام "برمجة تطبيقات Google"، استخدِم
خدمة Chat المتقدّمة
بدلاً من تثبيت مكتبة برامج العميل.
النوع والطريقة وأسماء الحقول
استنادًا إلى ما إذا كنت تستخدم مكتبات برامج أو gRPC أو REST، يختلف النوع والطريقة وأسماء الحقول لواجهة Google Chat API بعض الشيء:
- يتم ترتيب "مكتبات البرامج للعملاء على السحابة الإلكترونية" حسب خدمات gRPC وطرقها.
يتم ترتيب مكتبات برامج Google API على شكل خدمات تحتوي على عناصر أو فئات تتوافق مع موارد REST، والتي تحتوي أيضًا على طرق متوافقة.
- يتم ترتيب gRPC حسب الخدمات وطرقها.
- يتم ترتيب REST حسب التسلسلات الهرمية للموارد وطرقها.
- تستخدم أسماء حقول gRPC تنسيق snake case.
- تستخدم أسماء حقول REST تنسيق CamelCase، مع أنّ خدمة واجهة برمجة التطبيقات تقبل تنسيق CamelCase أو snake_case.
- تستخدم أسماء حقول مكتبة البرامج للعملاء حالة العنوان أو حالة Camel أو حالة Snake،
حسب الاسم المناسب للغة.
آليات سَلسلة البيانات المنظّمة
سواء كنت تستخدم مكتبات برامج أو REST أو gRPC، يتم تحديد الخدمة الأساسية باستخدام مخازن البروتوكول. على وجه الخصوص، تستخدم الخدمة proto3.
عند استدعاء واجهة برمجة التطبيقات، قد تتطلّب بعض حقول الطلبات أو الردود فهمًا أساسيًا لأنواع بروتوكول المخزن المؤقت المعروفة.
بالإضافة إلى ذلك، عند طلب بيانات من واجهة REST API، قد يؤدي سلوك القيمة التلقائية لمخازن البروتوكول إلى عدم توفّر بعض الحقول في استجابة JSON. يتم ضبط هذه الحقول على القيمة التلقائية، لذا لا يتم تضمينها في الردّ.
إصدارات واجهة برمجة التطبيقات
تتوفّر إصدارات واجهة برمجة التطبيقات التالية:
معاينة المطور
في المستندات، قد تظهر لك طرق أو حقول خاصة بواجهة برمجة التطبيقات لا تتوفّر إلا من خلال "برنامج معاينة المطوّرين". لاختبار ميزات المعاينة الأخيرة والاطّلاع عليها وتقديم الملاحظات بشأنها، يمكنك الانضمام إلى برنامج معاينة المطوّرين.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThis page offers guidance on utilizing the Google Chat API and navigating its reference documentation, including gRPC and REST interfaces.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers are encouraged to use the provided client libraries for Python, Java, Node.js, or the Advanced Chat service for Google Apps Script.\u003c/p\u003e\n"],["\u003cp\u003eType, method, and field names may vary slightly depending on whether you are using client libraries, gRPC, or REST, with details provided on their respective conventions.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Chat API is built upon protocol buffers, specifically proto3, which may require a basic understanding for certain request and response fields.\u003c/p\u003e\n"],["\u003cp\u003eStable API version v1 is currently available, with access to developer preview features obtainable through the Developer Preview Program.\u003c/p\u003e\n"]]],["The Google Chat API offers gRPC and REST interfaces, with corresponding client libraries or the option to create custom ones. Developers can use Cloud Client Libraries, or the Advanced Chat service with Google Apps Script. Type, method, and field names vary across libraries, gRPC, and REST. The API relies on protocol buffers (proto3), which can impact JSON responses due to default value behavior. The current stable version is v1, with a Developer Preview program for testing new features.\n"],null,["# Google Chat API overview\n\nThis page provides an overview of how to use Google Chat API and its reference\ndocumentation.\n\nGoogle Chat API has both [gRPC](/workspace/chat/api/reference/rpc) and\n[REST](/workspace/chat/api/reference/rest) interfaces, and\n[client libraries](/workspace/chat/libraries) that support both. Optionally, if\nthe provided client libraries don't meet your needs, you can write your own\nclient libraries that use the gRPC or REST interface.\n\nClient libraries\n----------------\n\nThe recommended way for most developers to call the Google Chat API\nis with our officially supported\n[Cloud Client Libraries](/workspace/chat/libraries)\nfor your preferred language, like Python, Java, or Node.js.\n\nIf you're coding with Google Apps Script, use the\n[Advanced Chat service](/apps-script/advanced/chat)\ninstead of installing a client library.\n\nType, method, and field names\n-----------------------------\n\nDepending on whether you're using client libraries, gRPC, or REST, the type,\nmethod, and field names for the Google Chat API vary somewhat:\n\n- Cloud Client Libraries are arranged by gRPC services and their methods. Google API Client Libraries are arranged as services that contain objects or classes that correspond with REST resources, which also contain corresponding methods.\n- gRPC is arranged by services and their methods.\n- REST is arranged by resource hierarchies and their methods.\n- gRPC field names use snake case.\n- REST field names use camel case, though the API service will accept either camel case or snake case.\n- Client library field names use either title case, camel case or snake case, depending on which name is idiomatic for the language.\n\nProtocol buffers\n----------------\n\nWhether you are using client libraries, REST, or gRPC, the underlying service is\ndefined using [protocol buffers](/protocol-buffers). In particular, the service\nuses [proto3](/protocol-buffers/docs/proto3).\n\nWhen calling the API, some request or response fields can require a basic\nunderstanding of\n[protocol buffer well-known types](/protocol-buffers/docs/reference/google.protobuf).\n\nIn addition, when calling the REST API, the\n[default value](/protocol-buffers/docs/proto3#default) behavior for protocol\nbuffers may result in missing fields in a JSON response. These fields are\nset to the default value, so they are not included in the response.\n\nAPI versions\n------------\n\nThe following API versions are available:\n\n- **v1**: Stable.\n\nDeveloper Preview\n-----------------\n\nIn the documentation, you might see API methods or fields that are only\navailable through the Developer Preview Program. To test and preview and offer\nfeedback on the latest preview features, join the\n[Developer Preview Program](/workspace/preview).\n\nRelated topics\n--------------\n\n- [Call the Google Chat API](/workspace/chat/api-overview)"]]