new_releases 更新:查看
版本資訊瞭解新功能和產品更新。
Method: phones.agentMessages.delete
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
撤銷已傳送但尚未傳送的服務專員訊息。
如果 RBM 平台成功撤銷訊息,該訊息就會從使用者訊息佇列中刪除,並且永遠不會傳送。
無論訊息是否成功撤銷,此方法會立即傳回 200 OK。
在 RBM 平台在傳送訊息期間,代理程式偶爾可能提出撤銷要求。在這種極少數的情況下,服務專員在啟動撤銷要求後不久,就會收到訊息的「送達」使用者事件。
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
必要欄位。代理程式的專屬 ID。
|
回應主體
如果成功,回應主體會是空的 JSON 物件。
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/rcsbusinessmessaging
詳情請參閱 OAuth 2.0 Overview。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間: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)."]]