Zalo — Tải lên
Tải ảnh lên (Upload image) — zalo.upload_image
Upload a JPG or PNG (max 1 MB). Returns attachment_id, valid for 7 days.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
file_url | Đường dẫn tệp | string | có | HTTPS URL of the file to upload (max 1000000 bytes). Pattern: ^https://. |
file_name | Tên tệp | string | không | File name to send to Zalo. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | The uploaded file. |
data.attachment_id | string | ID of the uploaded image. Pass it as attachment_id to send_image; valid for 7 days. |
Tải GIF lên (Upload GIF) — zalo.upload_gif
Upload a GIF (max 5 MB). Returns attachment_id.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
file_url | Đường dẫn tệp | string | có | HTTPS URL of the file to upload (max 5000000 bytes). Pattern: ^https://. |
file_name | Tên tệp | string | không | File name to send to Zalo. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | The uploaded file. |
data.attachment_id | string | ID of the uploaded GIF. Pass it as attachment_id to send_image. The reference field table calls it token, but its example returns attachment_id; this follows the example. |
Tải tệp lên (Upload file) — zalo.upload_file
Upload a PDF, DOC, DOCX or CSV (max 5 MB). Returns the token for send_file.
| Tác động | Rủi ro | Cần duyệt | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | có | không | — |
Input
| Field | Nhãn | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|---|
file_url | Đường dẫn tệp | string | có | HTTPS URL of the file to upload (max 5000000 bytes). Pattern: ^https://. |
file_name | Tên tệp | string | không | File name to send to Zalo. |
Field thêm: bỏ qua.
Output
| Field | Nhãn | Kiểu | Mô tả |
|---|---|---|---|
data | Kết quả | object | The uploaded file. |
data.token | string | Token of the uploaded file. Pass it to send_file. |