Zalo.Net 1.0.7

dotnet add package Zalo.Net --version 1.0.7
                    
NuGet\Install-Package Zalo.Net -Version 1.0.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Zalo.Net" Version="1.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zalo.Net" Version="1.0.7" />
                    
Directory.Packages.props
<PackageReference Include="Zalo.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Zalo.Net --version 1.0.7
                    
#r "nuget: Zalo.Net, 1.0.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Zalo.Net@1.0.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Zalo.Net&version=1.0.7
                    
Install as a Cake Addin
#tool nuget:?package=Zalo.Net&version=1.0.7
                    
Install as a Cake Tool

Zalo.Net

Thư viện C# SDK hiệu năng cao cho giao thức Zalo Web Client trên nền tảng .NET 10.

Features

  • Xác thực QR Code: Bắt đầu luồng đăng nhập QR, lấy ảnh mã QR dạng Base64 PNG và kiểm tra trạng thái xác thực.
  • WebSocket Thời Gian Thực: Lắng nghe tin nhắn Realtime qua WebSocket với cơ chế tự động kết nối lại (Auto-Reconnect) Exponential Backoff.
  • Tương Tác Tin Nhắn: Gửi tin nhắn cá nhân & nhóm chat, trích dẫn (Quote), thu hồi (Recall), thả cảm xúc (Reaction), gửi Sticker, tệp tin & hình ảnh.
  • Quản Lý Nhóm & Danh Bạ: Tạo nhóm, thêm/xóa thành viên, rời nhóm, đổi tên nhóm; tìm kiếm người dùng theo số điện thoại, quản lý lời mời kết bạn, chặn/bỏ chặn người dùng.
  • Hỗ Trợ Proxy Đa Tài Khoản: Gán Proxy riêng (IWebProxy HTTP/HTTPS/SOCKS5) cho từng tài khoản Zalo trên cùng 1 Server.
  • Diagnostics Tracing: Tích hợp sẵn ZaloDiagnosticsEvents sử dụng chuẩn DiagnosticSource của .NET.

Solution Architecture

Dự án Mô tả vai trò
Zalo.Net.Contracts DTOs, Record Models, Exceptions, IZaloClient, ZaloConstants, ZaloDiagnosticsEvents.
Zalo.Net.Cryptography Mã hóa/Giải mã AES-GCM phần cứng Native (SIMD), AES-CBC, MD5 và giải mã khung WebSocket (WsFrameCodec).
Zalo.Net.Auth Quản lý CookieStore, ZaloHttpClient (SocketsHttpHandler) và các API xác thực.
Zalo.Net.WebSocket Real-time WebSocket engine (ZaloWsListener) duy trì kết nối và nhận tin nhắn.
Zalo.Net Client facade chính (ZaloWebClient) tích hợp toàn bộ các API Endpoints.

Usage Example

using System.Net;
using Zalo.Net;
using Zalo.Net.Contracts;

// 1. Nạp phiên đã lưu và khởi tạo client kèm Proxy
ZaloSessionMaterial material = GetSavedMaterial();
using ZaloWebClient client = new(proxy: new WebProxy("http://127.0.0.1:8080"));

ZaloSession session = await ZaloWebClient.LoginWithSessionAsync(material, CancellationToken.None);

// 2. Đăng ký sự kiện nhận tin nhắn Realtime
client.MessageReceived += (sender, msg) =>
{
    Console.WriteLine($"[{msg.DisplayName}]: {msg.Content}");
};

// 3. Gửi tin nhắn văn bản
await ZaloWebClient.SendTextAsync(session, "USER_ID", ZaloThreadType.User, "Xin chào!", CancellationToken.None);

// 4. Lắng nghe WebSocket thời gian thực với cơ chế tự động kết nối lại
await client.RunWithReconnectAsync(material, ct: CancellationToken.None);

Disclaimer

Chú ý: Zalo.Net là thư viện mã nguồn mở độc lập được phát triển phục vụ mục đích nghiên cứu học tập và giao thức kỹ thuật. Thư viện không trực thuộc, liên kết hay được ủy quyền bởi VNG Corporation hay Zalo. Người sử dụng tự chịu mọi trách nhiệm tuân thủ Điều khoản dịch vụ của Zalo khi vận hành.


Copyright (c) 2026 PPN Corporation. All rights reserved.

Distributed under the Apache License 2.0.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Zalo.Net:

Package Downloads
Zalo.Net.Bot

High-level, attribute-based Event Bot Framework for Zalo.Net SDK.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.7 80 9/24/2026
1.0.6 88 9/23/2026
1.0.5 85 9/23/2026
1.0.4 86 9/22/2026
1.0.3 1,230 9/17/2026
1.0.1 117 8/3/2026
1.0.0 109 8/3/2026