new_releases التعديلات: يمكنك الاطّلاع على
ملاحظات الإصدار للتعرّف على الميزات الجديدة وتحديثات المنتجات.
Method: phones.agentEvents.create
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
لإرسال حدث من الوكيل إلى مستخدم
يمكن استخدام أحداث الوكيل للإشارة إلى أنّ الوكيل قد قرأ رسالة من المستخدم أو أنّ الوكيل قيد الكتابة (ما يضيف عنصرًا بشري إلى تجربة RBM). في حال تعذَّر على ميزة RBM الوصول إلى المستخدم، تعرض منصة RBM القيمة 404 NOT_FOUND
.
على عكس رسائل الوكيل، لا يمكن إبطال أحداث الوكيل بعد الإرسال.
طلب HTTP
POST https://rcsbusinessmessaging.googleapis.com/v1/{parent=phones/*}/agentEvents
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
parent |
string
"phones/{E.164}"، حيث يشير {E.164} إلى رقم هاتف المستخدم بالتنسيق E.164. على سبيل المثال، بالنسبة إلى مستخدم لديه رقم الهاتف في الولايات المتحدة +1-222-333-4444، ستكون القيمة Phone/+12223334444، وستكون نقطة النهاية الناتجة هي https://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentEvents.
|
مَعلمات طلب البحث
المعلمات |
eventId |
string
معرّف الحدث، الذي حدّده الوكيل ويجب أن يكون هذا المعرّف الفريد العالمي (UUID) على النحو المحدّد في https://tools.ietf.org/html/rfc4122. تتجاهل منصة RBM أي رسالة وكيل تم إرسالها مع معرّف تم استخدامها في رسالة سابقة أو حدث سابق تم إرساله من الوكيل نفسه.
|
agentId |
string
مطلوب. المعرّف الفريد للوكيل
|
نص الطلب
يحتوي نص الطلب على مثال AgentEvent
.
نص الاستجابة
في حال نجاح الإجراء، يحتوي نص الاستجابة على مثيل AgentEvent
تم إنشاؤه حديثًا.
نطاقات التفويض
يجب توفير نطاق OAuth التالي:
https://www.googleapis.com/auth/rcsbusinessmessaging
لمزيد من المعلومات، يُرجى الاطّلاع على OAuth 2.0 Overview.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eAgent events are used to signal that an agent has read a user's message or is currently typing, adding a human touch to the interaction.\u003c/p\u003e\n"],["\u003cp\u003eAgent events cannot be revoked once sent, unlike agent messages, which means they are a permanent record of the interaction.\u003c/p\u003e\n"],["\u003cp\u003eTo send an agent event, use a \u003ccode\u003ePOST\u003c/code\u003e request to the specified URL, including the user's E.164 formatted phone number in the path.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eeventId\u003c/code\u003e and \u003ccode\u003eagentId\u003c/code\u003e are required as query parameters when sending an event, and \u003ccode\u003eeventId\u003c/code\u003e needs to be a UUID according to RFC4122 standards.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful agent event requests will return a new instance of the sent AgentEvent in the response body.\u003c/p\u003e\n"]]],[],null,["# Method: phones.agentEvents.create\n\nSends an event from the agent to a user.\n\nAgent events can be used to indicate that the agent has read a message from the user or that the agent is in the process of typing (which adds a human element to the RBM experience). If RBM can't reach the user, the RBM platform returns `404 NOT_FOUND`.\n\nUnlike agent messages, agent events cannot be revoked after sending.\n\n### HTTP request\n\n`POST https://rcsbusinessmessaging.googleapis.com/v1/{parent=phones/*}/agentEvents`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` \"phones/{E.164}\", where {E.164} is the user's phone number in E.164 format. For example, for a user with the US phone number +1-222-333-4444, the value would be phones/+12223334444, and the resulting endpoint would be \u003chttps://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentEvents\u003e. |\n\n### Query parameters\n\n| Parameters ||\n|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `eventId` | `string` The ID of the event, assigned by the agent. This must be a UUID, as defined in \u003chttps://tools.ietf.org/html/rfc4122\u003e. The RBM platform ignores any agent message sent with an ID that was used by an earlier message or event sent from the same agent. |\n| `agentId` | `string` Required. The agent's unique identifier. |\n\n### Request body\n\nThe request body contains an instance of [AgentEvent](/business-communications/rcs-business-messaging/reference/rest/v1/phones.agentEvents#AgentEvent).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [AgentEvent](/business-communications/rcs-business-messaging/reference/rest/v1/phones.agentEvents#AgentEvent).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/rcsbusinessmessaging`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]