new_releases עדכונים: בדקו את
נתוני הגרסה כדי לגלות תכונות חדשות ועדכוני מוצרים.
Method: phones.agentEvents.create
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
שליחת אירוע מהנציג למשתמש.
אפשר להשתמש באירועים של הנציג כדי לציין שהנציג קרא הודעה מהמשתמש או שהוא נמצא בתהליך הקלדה (המשמעות היא שמוסיף רכיב אנושי לחוויה של RBM). אם ל-RBM לא תהיה אפשרות להגיע למשתמש, פלטפורמת RBM תחזיר את הערך 404 NOT_FOUND
.
בניגוד להודעות מנציג, אי אפשר לבטל אירועים של נציגים אחרי השליחה.
בקשת HTTP
POST https://rcsbusinessmessaging.googleapis.com/v1/{parent=phones/*}/agentEvents
כתובת ה-URL משתמשת בתחביר של Transcoding של 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 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[[["\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)."]]