The multichannel auto-generated OTP
This endpoint is ideal for sending the OTP using multichannel mechanism.
The message will switch to SMS in case of the ZNS message gets failed with the same OTP.
HTTP request
POST
https://rest.esms.vn/MainService.svc/json/SendMessageAutoGenCode_V5
Content Type: application/json
Response Type: application/json
Request body:
ApiKey
string
Your API Key.
Phone
string
The phone number of receiver.
TimeAlive
string
The time-to-live of the OTP. Unit of cal: minute Min: 2 Max: 15
SecretKey
string
Your Secret Key.
MultiChannelTempId
string
The Id vaue provided by ViHAT. To use this endpoint, you must have the OA and brandname. You have to send the ZNS and SMS template id to your saleman for creating.
TypeId
string
1: Only generate the OTP 2: Generate and send the OTP to phone.
Response:
Valid request.
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.
Use API Checkcode to check the validation of OTP. See it at API Checkcode.
Last updated