Get callback data

This endpoint is used for getting the callback data in case of the callback URL is unable to receive the webhook.

If the request does not place the CallbackUrl, this endpoint will not return any information.

HTTP request

POST https://status-sms.esms.vn/ZaloCallback/GetCallback

  • Content Type: application/json

  • Response Type: application/json

curl --location 'https://status-sms.esms.vn/ZaloCallback/GetCallback' \
--header 'Content-Type: application/json' \
--data '{
    "ApiKey":"{{ApiKey}}",
    "SecretKey":"{{SecretKey}}",
    "ListRefid": [
        "{{Refid}}",
        "{{Refid}}",
        "{{Refid}}"
    ],
    "OAId": "{{OAId}}"
}'
  • Body request:

Paramter
Type
Required
Description

ApiKey

string

Your API key.

SecretKey

string

Your Secret key.

ListRefid

string

The list of message ids that returned by ViHAT. Maximum is 200 message ids per call.

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.


  • Response:

{
    "Code": 100,
    "Message": "Success",
    "Data_callback": [
        {
            "SMSID": "4a496110-9fd3-4838-ac8b-bcaa36616f7011",
            "SendFailed": 1,
            "SendSuccess": 0,
            "SendStatus": 5,
            "TotalPrice": 0.0,
            "TotalReceiver": 1,
            "TotalSent": 1,
            "RequestId": null,
            "TypeId": 25,
            "Telcoid": 1,
            "PhoneNumber": "0909090909",
            "CallbackUrl": "https://api.esms.vn/zalo-zns/zns/receive-callback",
            "Partnerids": "7984e9b198c40e9957d6",
            "ErrorInfo": "{\"error\":-124,\"message\":\"Access token is invalid\"}Object reference not set to an instance of an object.",
            "OAId": "1090257973118325189",
            "ZnsTempId": "228386"
        } 
                    ]
  } 

Valid request.

  • Response body:

Paramter
Type
Description

SMSID

string

Message id that returned by ViHAT.

SendFailed

string

Number of failed messages.

SendSuccess

string

Number of success messages.

SendStatus

string

Message status. 2: In process 5: Sent

TotalPrice

string

The cost of message.

TotalReceiver

string

Total receivers.

TotalSent

string

Total messages are sent.

RequestId

string

The id of client in the request.

TypeId

string

Type of message.

  • Type 24: ZNS priority.

  • Type 25: ZNS normal.

Telcoid

string

Mạng viễn thông của thuê bao nhận tin. The telco of phone number.

  • 1: Viettel

  • 2: Mobifone

  • 3: Vinaphone

  • 4: Vietnammobile

  • 5: Gmobile

  • 6: Itel

  • 7: Reddi

PhoneNumber

string

The phone number of receiver

CallbackUrl

string

The URL callback of client.

Partnerids

string

The message id of Zalo

ErrorInfo

string

The error info of request.

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.

ZnsTempId

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.

Note:

  • Maximum is 200 message ids per call. Only 200 first message will be returned if it is larger than 200.

  • TPS: 20.

Last updated