Skip to content

Zalo — Uploads ​

Upload image — zalo.upload_image ​

Upload a JPG or PNG (max 1 MB). Returns attachment_id, valid for 7 days.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesno—

Input

FieldTypeRequiredDescription
file_urlstringyesHTTPS URL of the file to upload (max 1000000 bytes). Pattern: ^https://.
file_namestringnoFile name to send to Zalo.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectThe uploaded file.
data.attachment_idstringID 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 effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesno—

Input

FieldTypeRequiredDescription
file_urlstringyesHTTPS URL of the file to upload (max 5000000 bytes). Pattern: ^https://.
file_namestringnoFile name to send to Zalo.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectThe uploaded file.
data.attachment_idstringID 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 effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesno—

Input

FieldTypeRequiredDescription
file_urlstringyesHTTPS URL of the file to upload (max 5000000 bytes). Pattern: ^https://.
file_namestringnoFile name to send to Zalo.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectThe uploaded file.
data.tokenstringToken of the uploaded file. Pass it to send_file.