Tin Zalo giao dịch
HTTP request
POST
https://rest.esms.vn/mainservice.svc/json/SendZaloFollowerMessage_V5_post_json/
Content Type: text/plain
Response Type: application/json
curl --location 'https://rest.esms.vn/mainservice.svc/json/SendZaloFollowerMessage_V5_post_json/' \
--header 'Content-Type: text/plain' \
--data '{
"ApiKey": "{{ApiKey}}",
"SecretKey": "{{SecretKey}}",
"OAID": "{{OAID}}",
"CallbackUrl": "{{CallbackUrl}}",
"Sandbox":0,
"Payload": {
"recipient": {
"user_id": "{{user_id}}"
},
"message": {
"attachment": {
"type": "template",
"payload": {
"template_type": "{{template_type}}",
"language": "{{language}}",
"elements": [
{
"image_url": "{{image_url}}",
"type": "banner"
},
{
"type": "header",
"content": "{{content}}",
"align": "{{align}}"
},
{
"type": "text",
"align": "{{align}}",
"content": "{{content}}"
},
{
"type": "table",
"content": [
{
"value": "{{value}}",
"key": "{{key}}"
},
{
"value": "{{value}}",
"key": "{{key}}"
},
{
"style": "{{style}}",
"value": "{{value}}",
"key": "{{key}}"
},
{
"value": "{{value}}",
"key": "{{key}}"
},
{
"value": "{{value}}",
"key": "{{key}}"
},
{
"value": "{{value}}",
"key": "{{key}}"
}
]
},
{
"type": "text",
"align": "{{align}}",
"content": "{{content}}"
}
],
"buttons": [
{
"title": "{{title}}",
"image_icon": "{{image_icon}}",
"type": "oa.open.url",
"payload": {
"url": "{{url}}"
}
},
{
"title": "{{title}}",
"image_icon": "{{image_icon}}",
"type": "oa.query.show",
"payload": "{{payload}}"
},
{
"title": "{{title}}",
"type": "oa.open.sms",
"payload": {
"content": "{{content}}",
"phone_code": "{{phone_code}}"
}
},
{
"title": "{{title}}",
"image_icon": "{{image_icon}}",
"type": "oa.open.phone",
"payload": {
"phone_code": "{{phone_code}}"
}
}
]
}
}
}
}
}'
Cấu trúc body của request:
Response
{
"CodeResult": "100",
"CountRegenerate": 0,
"SMSID": "d8e0f1f0702544b2acb456ca9ccfd111250"
}
Request hợp lệ.
{
"CodeResult": "101",
"CountRegenerate": 0,
"ErrorMessage": "Authorize Failed"
}
Sai thông tin ApiKey/SecretKey.
Cấu trúc body của response:
Thông tin chi tiết mã lỗi xem ở bảng: Mã lỗi .
Lấy code mẫu các ngôn ngữ trên Postman: Link code mẫu.
Last updated