Zalo Send Message icon

Zalo Send Message

Gửi tin nhắn qua API Zalo sử dụng kết nối đăng nhập bằng cookie

Zalo Send Message

AI-generated

Summary

Send a Zalo message to a thread with optional urgency, quoting, mentions, and attachments.

Inputs

  • threadId (required) — ID của thread để gửi tin nhắn
  • type — Loại của tin nhắn (user hoặc group), User mặc định là 0, Group là 1
  • message (required) — Nội dung tin nhắn cần gửi
  • urgency — Mức độ khẩn cấp của tin nhắn, mặc định 0 (Default), 1 (Important), 2 (Urgent)
  • quote — Trích dẫn tin nhắn trước đó, chứa msgId, senderId, content
  • mentions — Mention người dùng trong tin nhắn, chứa uid, pos, len
  • attachments — Một hoặc nhiều ảnh đính kèm để gửi

Output shape

array of items, each with a json field containing success status, raw API response, threadId, threadType, and the constructed message payload.

Nếu có lỗi và continueOnFail được bật, kết quả sẽ là {success: false, error: message} thay vì ném ra lỗi.

Examples

Example 1: Gửi tin nhắn cá nhân

threadId: '12345', type: 0 (User), message: 'Chào bạn!'

Example 2: Gửi tin nhắn group kèm trích dẫn và mention

threadId: '67890', type: 1 (Group), message: 'Hội đồng đã phê duyệt', quote: {msgId: 'msg001', senderId: 'user1', content: 'Câu cũ'}, mentions: [{uid: 'user2', pos: 0, len: 5}]

Discussion