All read mark methods are accessed via client.readMark.<method>().
Control read status of messages in chats.
Purpose: Mark all messages in a chat as read.
Signature:
Response ReadMark::readChat(const nlohmann::json message);Required Parameters:
chatId(string): Chat ID in<phone>@c.usor<group>@g.usformat
Response:
{
"result": true
}Example:
nlohmann::json mark = {
{"chatId", "79876543210@c.us"}
};
Response resp = client.readMark.readChat(mark);
if (resp.success) {
std::cout << "Chat marked as read" << std::endl;
}Official Docs: https://green-api.com/en/docs/api/marks/ReadChat/
Last Updated: 2024