AI-generated Key Takeaways
-
This function allows agents to revoke an undelivered message, removing it from the user's message queue.
-
A 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.
-
In 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.
-
The 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.
-
The request requires the agent's unique identifier as a query parameter and must use the specified OAuth scope for authorization.
Revokes an agent message that has been sent but not yet delivered.
If the RBM platform successfully revokes a message, then the message is deleted from the user’s message queue and is never delivered.
This method immediately returns 200 OK, whether or not the message was successfully revoked.
There 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.
HTTP request
DELETE https://rcsbusinessmessaging.googleapis.com/v1/{name=phones/*/agentMessages/*}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name |
"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 https://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentMessages/12345xyz. |
Query parameters
Parameters | |
---|---|
agentId |
Required. The agent's unique identifier. |
Request body
The request body must be empty.
Response body
If successful, the response body is an empty JSON object.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/rcsbusinessmessaging
For more information, see the OAuth 2.0 Overview.