Version
zca-js@2.1.2 (latest published; also verified against main — identical source).
Summary
api.getGroupChatHistory(groupId, count) fails with ZaloApiError: Request failed with status code 404 for a valid group, while other group-service calls on the same session and same service host succeed.
Reproduction
const api = await zalo.login({ cookie, imei, userAgent }); // session OK
api.getOwnId(); // ✅ returns own uid
await api.getAllGroups(); // ✅ group present in gridVerMap
await api.getGroupInfo(groupId); // ✅ valid group, enableMsgHistory: 1, real members
await api.getGroupChatHistory(groupId, 50); // ❌ ZaloApiError 404
- The
groupId is confirmed correct (it's a key in getAllGroups().gridVerMap, and getGroupInfo returns its full info with name, creatorId, members).
- The group is not empty — it has messages.
enableMsgHistory is 1 in the group settings.
Likely cause
Both calls target the same host (api.zpwServiceMap.group[0]), but:
getGroupInfo → /api/group/getmg-v2 — works
getGroupChatHistory → /api/group/history — 404
The working sibling is versioned (getmg-v2); the failing one is the unversioned /api/group/history. It looks like Zalo moved/retired the old group-history path server-side (possibly to a versioned endpoint), so the current getGroupChatHistory implementation 404s.
Request
Could the group-history endpoint URL / params be updated to whatever the current Zalo Web client uses? Happy to help capture the current request shape if useful.
Version
zca-js@2.1.2(latest published; also verified againstmain— identical source).Summary
api.getGroupChatHistory(groupId, count)fails withZaloApiError: Request failed with status code 404for a valid group, while other group-service calls on the same session and same service host succeed.Reproduction
groupIdis confirmed correct (it's a key ingetAllGroups().gridVerMap, andgetGroupInforeturns its full info withname,creatorId, members).enableMsgHistoryis1in the group settings.Likely cause
Both calls target the same host (
api.zpwServiceMap.group[0]), but:getGroupInfo→/api/group/getmg-v2— worksgetGroupChatHistory→/api/group/history— 404The working sibling is versioned (
getmg-v2); the failing one is the unversioned/api/group/history. It looks like Zalo moved/retired the old group-history path server-side (possibly to a versioned endpoint), so the currentgetGroupChatHistoryimplementation 404s.Request
Could the group-history endpoint URL / params be updated to whatever the current Zalo Web client uses? Happy to help capture the current request shape if useful.