Send message via Zalo by UID
HTTP request
POST https://rest.esms.vn//MainService.svc/json/SendZaloMessage_V6/zalo_uid/
Content Type: application/json
Response Type: application/json
curl --location 'https://rest.esms.vn//MainService.svc/json/SendZaloMessage_V6/zalo_uid/' \
--header 'Content-Type: application/json' \
--data '{
"ApiKey": "APIKEYCUABAN",
"SecretKey": "SECRETKEYCUABAN",
"OAID": "4097311281936189049",
"ZaloUid": "0901888484",
"TempData": {
"customer_name": "Đinh Thái Hà",
"order_code": "HD00001",
"address": "140-142 Đường Số 1, KDC Vạn Phúc, Hiệp Bình Phước, Thủ Đức",
"phone": "0901888484",
"email": "dinhthaiha@vihatgroup.com",
"product_name": "Gói duy trì OA Zalo Premium 1 năm",
"quantity": "1",
"payment_amount": "4308000",
"delivery_date": "01/08/2024"
},
"TempID": "200607",
"campaignid": "Xác nhận mua hàng",
"RequestId": "96accf59-0c41-4bc7-a5c4-4a466c2e41c2",
"CallbackUrl": "https://esms.vn/webhook/"
}'Request body
ZaloUid
string
The Zalo Userid of receivers.
ApiKey
string
Your API Key.
SecretKey
string
Your Secret Key.
OAID
string
Zalo OA Id is the Zalo Official Account Id of the organization. It can be obtained by accessing to the Zalo administrator page.
Note: Pre-registration is required.
TempData
Json object
The dynamic json object of the template that is registered at Zalo. The template data structure is specified separatedly for each teamplate.
SendDate
string
Schedule the time when the message to the receiver. If it's empty, the message will be instantly sent to the receiver. Format: yyyy-mm-dd hh:MM:ss
TempID
string
The ID of template for the OA that is registered and provided by eSMS at Zalo to partner. Each template will have a specified structure of body.
campaignid
string
The campaign name of request
RequestId
string
Partner ID passed to block duplicates and check if needed. Maximum length 50 characters. Each RequestId passed is valid for blocking for 24 hours.
Sandbox
string
Sandbox option value (default is 0): 1: For testing purpose to verify the validation of the request. Message is not charged and sent to the receiver. 0: Message will be processed to the receiver properly.
Response:
Valid request.
Invalid credential.
The template is not configured on your account.
Response body
CodeResult
string
Response code.
SMSID
string
The message id eSMS system.
ErrorMessage
string
The error message if the request is invalid.
The detail of error code can refer at Table of error codes .
Get the sample of code for programing languagues to use in Postman refer at Link of code samples.
Last updated