AI-generated Key Takeaways
-
Sends a receipt to a user confirming an agent's message was received.
-
Uses a PATCH request to the specified URL with the receipt information in the request body.
-
Requires the
https://www.googleapis.com/auth/businessmessages
OAuth scope for authorization. -
The response body contains the receipt details, including its name and type (read or unspecified).
-
Receipt types indicate whether the message was read by the user or remains unacknowledged.
Sends a receipt for a message from an agent to a user.
HTTP request
PATCH https://businessmessages.googleapis.com/v1/{receipt.name=conversations/*/messages/*/receipt}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
receipt.name |
The name of the receipt, as set by Business Messages. Resolves to "conversations/{conversationId}/messages/{messageId}/receipt", where {conversationId} is the unique ID for the conversation and {messageId} is the unique ID for the message. |
Request body
The request body contains an instance of Receipt
.
Response body
A receipt of the message.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"name": string,
"receiptType": enum ( |
Fields | |
---|---|
name |
The name of the receipt, as set by Business Messages. Resolves to "conversations/{conversationId}/messages/{messageId}/receipt", where {conversationId} is the unique ID for the conversation and {messageId} is the unique ID for the message. |
receiptType |
A receipt type. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/businessmessages
For more information, see the OAuth 2.0 Overview.
ReceiptType
Possible receipt types.
Enums | |
---|---|
RECEIPT_TYPE_UNSPECIFIED |
Unspecified receipt type. |
READ |
Message read. |