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.
Trong ví dụ sau, rbm_api_helper.js (không dùng cho Python) giả định rằng tệp bạn đang làm việc là một thư mục bên dưới thư mục ứng dụng chính. Bạn có thể cần điều chỉnh vị trí tuỳ thuộc vào cấu hình của dự án.
Mã sau đây thu hồi một thông báo hiện có chưa được phân phối bằng thư viện ứng dụng.
Node.js
// Reference to RBM API helperconstrbmApiHelper=require('@google/rcsbusinessmessaging');// Stop the message associated with messageId from being deliveredrbmApiHelper.revokeMessage('+12223334444',messageId,function(err,response){console.log(response);});
importcom.google.rbm.RbmApiHelper;…try{// Create an instance of the RBM API helperRbmApiHelperrbmApiHelper=newRbmApiHelper();// Stop the message associated with messageId from being deliveredrbmApiHelper.revokeMessage(messageId,"+12223334444");}catch(Exceptione){e.printStackTrace();}
# Reference to RBM Python client helper and messaging object structurefromrcs_business_messagingimportrbm_service# Stop the message associated with message_id from being deliveredrbm_service.revoke('+12223334444',message_id)
usingRCSBusinessMessaging;…// Create an instance of the RBM API helperRbmApiHelperrbmApiHelper=newRbmApiHelper(credentialsFileLocation,projectId);// Stop the message associated with messageId from being deliveredrbmApiHelper.RevokeMessage(messageId,"+12223334444");
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-04-10 UTC."],[],[]]