Zalo over API
Infobip supports Zalo through its dedicated API. Use the Infobip Zalo API to send notification messages to your customer base. Upon registering templates to use for your communication, proceed in using the Zalo API message method to formulate your request.
You can send multiple template messages in a single API request. Remember to add supplementary options to your send request in case you would like to benefit from our additional features.
Additional message options can be applied to your API request.
Every communication can be scheduled. You can set a start date, time and time zone. This feature comes in handy when you don’t want to disturb your customers during the night, or you want to send messages only during a specific period for optimal conversion.
An additional scheduling option is to set sending speed limit. For example, you can limit the sending speed when sending messages in bulk to deliver messages over a longer period of time. This feature can be beneficial when you expect recipients to react to your call-to-action embedded within the dispatched message. In that way you could avoid overwhelming your system or agents with an influx of responses from end customers and avoid operational strain. You can set the number (amount) of messages that will be sent periodically. Available time units are: minutes, hours, days.
You can also set a specific message delivery window outside of which messages won’t be delivered. You can set start time (hour/minute), end time (hour/minute) and days of the week. Time is expressed in the UTC time zone.
There is a specific time period for messages during which the system will try to deliver them. For example, when you want to send a message to your audience and some users have their cell phones turned off, the system will retry delivery to these users until the validity period passes. The default and also the maximum validity period is 48 hours. It does not need to be set for each request. If you want to set a shorter period, you should define it under Validity period. Available time units are: seconds, minutes, hours. Default value is minutes.
Add a failover to SMS option in case your Zalo message does not reach the end user within the defined period. You can also set a validity period for the SMS message.
"text": "Failover message text",
Zalo API works seamlessly with CPaaS X. This gives you greater flexibility in managing your configurations and resources in whatever manner that suits your needs. For more information about CPaaS X, refer to our CPaaS X documentation.
Use encryption to encode the message content before transmitting it for processing. Encrypted content will be re translated on Zalo side. All template values need to be encrypted using Cipher Type: RSA/ECB/OAEPWITHSHA-256ANDMGF1PADDING and Base64 encoded! Please use the RSA key generated by "Get existing RSA key" or "Create a new RSA key" methods while encrypting messages.
Use the webhooks > delivery > url parameter option if you want users to be able to set the URL where they want to receive API responses. Define the URL under the webhooks parameter of the API request.
Zalo Delivery Reports
This method allows you to get one-time delivery reports for sent Zalo messages.
This method allows you to get logs for Zalo messages. None of the query parameters is mandatory for this request. Any combination of parameters can be used to filter results. Some examples are shown below.
Zalo logs are available for the last 48 hours!
Zalo RSA encryption
Zalo Send API supports sending encrypted Zalo Notification Service message. To be able to encrypt the content of the Zalo message you need to first generate a public key.
Step 1: Generate RSA key
Use the RSA key generated by "Create a new RSA key" or "Get existing RSA key" methods while encrypting messages.
Create a new RSA key
The RSA key generation API allows you to generate a key pair consisting of a public key and a private key. Only the public key will be returned by this method. The private key will be stored by Zalo to decrypt the content.
Get existing RSA key
In case you've already generated an RSA key, please use the public key get API to get the public key.
Step 2: Encrypt templateData
The public key you received in step 1 will be in the form of a string. Please use Base64 encoding to convert public key to byte array format. Cipher Type when encode: RSA/ECB/OAEPWITHSHA-256ANDMGF1PADDING
all template values need to be encrypted using Cipher Type: RSA/ECB/OAEPWITHSHA-256ANDMGF1PADDING and Base64 encoded!
Use the public key to encrypt all template values using Cipher Type: RSA/ECB/OAEPWITHSHA-256ANDMGF1PADDING and encode Base64.
Step 3: Send encrypted content
Send encrypted content using our Zalo Send API with encrypted parameter set to true.