Zalo — Uploads
Upload image — zalo.upload_image
Upload a JPG or PNG (max 1 MB). Returns attachment_id, valid for 7 days.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | — |
Input
| Field | Type | Required | Description |
|---|---|---|---|
file_url | string | yes | HTTPS URL of the file to upload (max 1000000 bytes). Pattern: ^https://. |
file_name | string | no | File name to send to Zalo. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | 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. |
Upload GIF — zalo.upload_gif
Upload a GIF (max 5 MB). Returns attachment_id.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | — |
Input
| Field | Type | Required | Description |
|---|---|---|---|
file_url | string | yes | HTTPS URL of the file to upload (max 5000000 bytes). Pattern: ^https://. |
file_name | string | no | File name to send to Zalo. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | 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. |
Upload file — zalo.upload_file
Upload a PDF, DOC, DOCX or CSV (max 5 MB). Returns the token for send_file.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | — |
Input
| Field | Type | Required | Description |
|---|---|---|---|
file_url | string | yes | HTTPS URL of the file to upload (max 5000000 bytes). Pattern: ^https://. |
file_name | string | no | File name to send to Zalo. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | object | The uploaded file. |
data.token | string | Token of the uploaded file. Pass it to send_file. |