new_releases 更新:查看
版本说明,了解新功能和产品动态。
Method: phones.agentMessages.delete
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
撤消已发送但尚未发送的代理消息。
如果 RBM 平台成功撤消消息,则该消息将从用户的消息队列中删除,并且永远不会传送。
无论消息是否成功撤消,此方法都会立即返回 200 OK。
在少数情况下,客服人员可能会在 RBM 平台递送消息时发起撤消请求。在极少数情况下,代理会在发起撤消请求后不久收到针对消息的“DELIVERED”用户事件。
HTTP 请求
DELETE https://rcsbusinessmessaging.googleapis.com/v1/{name=phones/*/agentMessages/*}
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
"phones/{E.164}/agentMessages/{messageId}",其中 {E.164} 是用户的电话号码(采用 E.164 格式),{messageId} 是客服人员为应撤消的客服人员消息分配的 ID。例如,如果输入美国电话号码 +1-222-333-4444 和 ID 为“12345xyz”的代理消息,生成的端点将为 https://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentMessages/12345xyz。
|
查询参数
参数 |
agentId |
string
必需。代理的唯一标识符。
|
响应正文
如果成功,则响应正文为空的 JSON 对象。
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/rcsbusinessmessaging
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThis function allows agents to revoke an undelivered message, removing it from the user's message queue.\u003c/p\u003e\n"],["\u003cp\u003eA successful message revocation results in the message being deleted and never delivered to the user, but a 200 OK response is always returned regardless of success.\u003c/p\u003e\n"],["\u003cp\u003eIn rare cases, a message revocation might be initiated while the message is being delivered, possibly leading to the agent receiving a DELIVERED event shortly after.\u003c/p\u003e\n"],["\u003cp\u003eThe revocation is performed via a DELETE request to a specific URL endpoint, which requires the user's phone number in E.164 format and the agent-assigned ID of the message.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires the agent's unique identifier as a query parameter and must use the specified OAuth scope for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: phones.agentMessages.delete\n\nRevokes an agent message that has been sent but not yet delivered.\n\nIf the RBM platform successfully revokes a message, then the message is deleted from the user's message queue and is never delivered.\n\nThis method immediately returns 200 OK, whether or not the message was successfully revoked.\n\nThere is a small chance that the agent may initiate a revocation while the RBM platform is in the process of delivering the message. In these rare cases, the agent receives a DELIVERED user event for the message shortly after initiating the revocation request.\n\n### HTTP request\n\n`DELETE https://rcsbusinessmessaging.googleapis.com/v1/{name=phones/*/agentMessages/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` \"phones/{E.164}/agentMessages/{messageId}\", where {E.164} is the user's phone number in E.164 format and {messageId} is the agent-assigned ID of the agent message that should be revoked. For example, with the US phone number +1-222-333-4444 and an agent message with the ID \"12345xyz\", the resulting endpoint would be \u003chttps://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentMessages/12345xyz\u003e. |\n\n### Query parameters\n\n| Parameters ||\n|-----------|---------------------------------------------------|\n| `agentId` | `string` Required. The agent's unique identifier. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\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)."]]