Send Zalo messages to request user's information

HTTP request

POST https://rest.esms.vn/MainService.svc/json/SendZaloFollowerMessage_V5_post_json/

  • Content Type: application/json

  • Response Type: application/json

curl --location 'https://rest.esms.vn/MainService.svc/json/SendZaloFollowerMessage_V5_post_json/' \
--header 'Content-Type: application/json' \
--data '{
"ApiKey": "{{ApiKey}}",
"SecretKey": "{{SecretKey}}",
"OAID": "{{OAID}}",
"CallbackUrl":"{{CallbackURL}}",
    "Payload": {
        "recipient": {
            "user_id": "{{UserID}}"
        },
        "message": {
            "attachment": {
                "type": "template",
                "payload": {
                    "template_type": "request_user_info",
                    "elements": [
                        {
                            "title": "{{Title}}",
                            "subtitle": "{{Subtitle}}",
                            "image_url": "{{ImageURL}}"
                        }
                    ]
                }
            }
        }
    }
}'

  • Body request

Parameter
Type
Required
Description

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.

User_id

string

The identification value of user at Zalo.

Title

string

The title of template. Note: Max length is 100.

Subtitle

string

The subtitle of template. Note: Max length is 500.

ImageUrl

string

The image URL. Only accept .PNG or .JPG file

CallbackUrl

The webhook URL that will receive the status of message after it processed to the operator. It is used for determine whether the SMS is succcessfully delivered to the receiver or failed.


  • Response:

{
    "CodeResult": "100",
    "CountRegenerate": 0,
    "SMSID": "d8e0f1f0702544b2acb456ca9ccfd111250"
}

Valid request.

  • Response body

Parameter
Type
Description

CodeResult

string

Response code.

SMSID

string

The message id eSMS system.

ErrorMessage

string

The error message if the request is invalid.

Last updated