https://github.com/suprim-corp/zava
Unofficial Java SDK for Zalo Web API. Port of zca-js.
https://github.com/suprim-corp/zava
chat java sdk websocket zalo zalo-api zca-js
Last synced: about 2 hours ago
JSON representation
Unofficial Java SDK for Zalo Web API. Port of zca-js.
- Host: GitHub
- URL: https://github.com/suprim-corp/zava
- Owner: suprim-corp
- License: mit
- Created: 2026-04-18T08:19:04.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-18T20:54:06.000Z (2 months ago)
- Last Synced: 2026-04-18T21:20:44.915Z (2 months ago)
- Topics: chat, java, sdk, websocket, zalo, zalo-api, zca-js
- Language: Java
- Homepage: https://github.com/suprim-corp/zava
- Size: 201 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
# Zava
[](https://github.com/suprim-corp/zava/actions/workflows/ci.yml)
[](https://jitpack.io/#suprim-corp/zava)
[](https://codecov.io/gh/suprim-corp/zava)



Unofficial Java SDK for Zalo Web API.
Port of [zca-js](https://github.com/RFS-ADRENO/zca-js) to Java.
> **WARNING**: Đây là SDK không chính thức. Zalo có thể thay đổi API, endpoints, hoặc
> encryption protocol bất kỳ lúc nào mà không báo trước. SDK này có thể bị break
> mà không có cách fix ngay.
> **WARNING**: Sử dụng automation trên Zalo có thể dẫn đến việc bị khóa tài khoản.
> Hãy tự chịu trách nhiệm. Rate limiting không được tích hợp sẵn trong SDK -
> consumer tự quản lý tốc độ gọi API.
## Requirements
- Java 11+
- Maven 3.9+
## Installation
Add the JitPack repository and dependency:
```xml
jitpack.io
https://jitpack.io
com.github.suprim-corp
zava
0.1.0
```
## Usage
```java
import dev.suprim.zava.*;
import dev.suprim.zava.auth.Credentials;
import dev.suprim.zava.conversation.ThreadType;
import dev.suprim.zava.message.Mention;
import dev.suprim.zava.message.Quote;
// Login
Zava zava = new Zava();
ZavaClient client = zava.login(Credentials.builder()
.imei("device-id")
.cookies(cookieList)
.userAgent("Mozilla/5.0 ...")
.build());
// Messages
client.messages().send("Hello!", userId, ThreadType.USER);
client.messages().send("Hi group!", groupId, ThreadType.GROUP);
client.messages().send("@all check this", groupId, ThreadType.GROUP,
List.of(Mention.all(0, 4)));
client.messages().delete(msgId, cliMsgId, uidFrom, threadId, type, onlyMe);
client.messages().undo(msgId, cliMsgId, threadId, type);
client.messages().forward("text", targetIds, type, origMsgId, 0);
// Users
client.users().findUser("0912345678");
client.users().getAllFriends();
client.users().blockUser(userId);
client.users().unblockUser(userId);
client.users().changeFriendAlias(friendId, "Nickname");
// Groups
client.groups().getGroupInfo("group-id-1", "group-id-2");
client.groups().getAllGroups();
client.groups().createGroup("Group Name", List.of("uid1", "uid2"));
client.groups().addUser(groupId, "new-member");
client.groups().removeUser(groupId, "member-to-kick");
client.groups().changeOwner(groupId, "new-owner-uid");
client.groups().changeName(groupId, "New Group Name");
// Reactions
client.reactions().addReaction(ReactionService.Reaction.LIKE,
msgId, cliMsgId, threadId, type);
// Stickers, Polls, Profile, Settings
client.stickers().search("hello");
client.polls().createPoll(groupId, "Favorite?", List.of("A", "B", "C"));
client.polls().getPollDetail(pollId);
client.profile().fetchAccountInfo();
client.settings().getMute();
client.settings().getLabels();
// Real-time listener
client.listener()
.onMessage(msg -> System.out.println(msg))
.onReaction(react -> System.out.println(react))
.onGroupEvent(event -> System.out.println(event))
.onTyping(typing -> System.out.println(typing))
.start();
// Save/restore session
credentials.saveTo(Path.of("session.json"));
Credentials saved = Credentials.loadFrom(Path.of("session.json"));
```
## API Coverage
| Service | Methods |
|---------|---------|
| Messages | `send`, `delete`, `undo`, `forward` (user + group, mentions, quote, TTL) |
| Users | `findUser`, `getAllFriends`, `blockUser`, `unblockUser`, `changeFriendAlias`, `getAliasList` |
| Groups | `getGroupInfo`, `getAllGroups`, `createGroup`, `addUser`, `removeUser`, `changeOwner`, `changeName` |
| Reactions | `addReaction` (7 built-in types + custom) |
| Stickers | `search` |
| Polls | `createPoll`, `getPollDetail` |
| Profile | `fetchAccountInfo` |
| Settings | `getMute`, `getLabels` |
| Listener | `onMessage`, `onReaction`, `onUndo`, `onTyping`, `onGroupEvent`, `onFriendEvent`, `onSeen`, `onDelivered`, `onUploadComplete` |
## Dependencies
| Library | Version | Purpose |
|---------|---------|---------|
| OkHttp | 4.12.0 | HTTP client, WebSocket, cookie management |
| Jackson | 2.19.0 | JSON serialization |
| SLF4J | 2.0.17 | Logging facade |
Tất cả crypto (AES-CBC, AES-GCM, MD5, zlib) sử dụng JDK built-in (`javax.crypto`, `java.security`, `java.util.zip`).
## Documentation
- [ARCHITECTURE.md](ARCHITECTURE.md) - Kiến trúc SDK
- [ROADMAP.md](ROADMAP.md) - Kế hoạch triển khai
- [ZCA-JS-REFERENCE.md](ZCA-JS-REFERENCE.md) - Phân tích codebase gốc zca-js
## License
[MIT](LICENSE)