Chúng tôi sẽ ngừng cung cấp ứng dụng Google Business Messages từ ngày 31 tháng 7 năm 2024. Đọc thêm
tại đây.
Method: conversations.messages.updateReceipt
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Gửi biên nhận cho tin nhắn từ một nhân viên hỗ trợ tới người dùng.
Yêu cầu HTTP
PATCH https://businessmessages.googleapis.com/v1/{receipt.name=conversations/*/messages/*/receipt}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Tham số |
receipt.name |
string
Tên của biên nhận, do Business Messages đặt. Phân giải thành "conversations/{conversationId}/messages/{messageId}/receipt", trong đó {conversationId} là mã nhận dạng duy nhất của cuộc trò chuyện và {messageId} là mã nhận dạng duy nhất của thư.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa một bản sao của Receipt
.
Nội dung phản hồi
Biên nhận thư.
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"name": string,
"receiptType": enum (ReceiptType )
} |
Trường |
name |
string
Tên của biên nhận, do Business Messages đặt. Phân giải thành "conversations/{conversationId}/messages/{messageId}/receipt", trong đó {conversationId} là mã nhận dạng duy nhất của cuộc trò chuyện và {messageId} là mã nhận dạng duy nhất của thư.
|
receiptType |
enum (ReceiptType )
Loại biên nhận.
|
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/businessmessages
Để biết thêm thông tin, hãy xem bài viết Tổng quan về OAuth 2.0.
ReceiptType
Các loại biên nhận có thể sử dụng.
Enum |
RECEIPT_TYPE_UNSPECIFIED |
Loại biên nhận chưa được chỉ định. |
READ |
Đã đọc tin nhắn. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eSends a receipt to a user confirming an agent's message was received.\u003c/p\u003e\n"],["\u003cp\u003eUses a PATCH request to the specified URL with the receipt information in the request body.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/businessmessages\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"],["\u003cp\u003eThe response body contains the receipt details, including its name and type (read or unspecified).\u003c/p\u003e\n"],["\u003cp\u003eReceipt types indicate whether the message was read by the user or remains unacknowledged.\u003c/p\u003e\n"]]],[],null,["# Method: conversations.messages.updateReceipt\n\nSends a receipt for a message from an agent to a user.\n\n### HTTP request\n\n`PATCH https://businessmessages.googleapis.com/v1/{receipt.name=conversations/*/messages/*/receipt}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `receipt.name` | `string` 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. |\n\n### Request body\n\nThe request body contains an instance of [Receipt](/business-communications/business-messages/reference/rest/v1/conversations.messages/updateReceipt#body.Receipt).\n\n### Response body\n\nA receipt of the message.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"receiptType\": enum (/business-communications/business-messages/reference/rest/v1/conversations.messages/updateReceipt#ReceiptType) } ``` |\n\n| Fields ||\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` 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. |\n| `receiptType` | `enum (`[ReceiptType](/business-communications/business-messages/reference/rest/v1/conversations.messages/updateReceipt#ReceiptType)`)` A receipt type. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/businessmessages`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).\n\nReceiptType\n-----------\n\nPossible receipt types.\n\n| Enums ||\n|----------------------------|---------------------------|\n| `RECEIPT_TYPE_UNSPECIFIED` | Unspecified receipt type. |\n| `READ` | Message read. |"]]