Tin gencode tự động SMS

Hàm cho phép bạn gọi API tự động tạo ra mã code OTP và sau đó gửi đến người dùng bằng brandname. Với OTP code là ngẫu nhiên. Phần code này do ViHAT xử lí.

HTTP request

GET https://rest.esms.vn/MainService.svc/json/SendMessageAutoGenCode_V4_get?Phone={Phone}&ApiKey={ApiKey}&SecretKey={SecretKey}&TimeAlive={TimeAlive}&NumCharOfCode={NumCharOfCode}&Brandname={Brandname}&Type=2&message={Content}

  • Response Type: application/json

curl --location --globoff 'https://rest.esms.vn/MainService.svc/json/SendMessageAutoGenCode_V4_get?Phone={{Phone}}&ApiKey={{ApiKey}}&SecretKey={{SecretKey}}&TimeAlive={{TimeAlive}}&NumCharOfCode={{NumCharOfCode}}&Brandname={{Brandname}}&Type=2&message={{Content}}&IsNumber={{IsNumber}}'
  • Cấu trúc body của request:


  • Response:

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

Request hợp lệ.

  • Cấu trúc body của response:

  • Thông tin chi tiết mã lỗi xem ở bảng: Mã lỗi .

  • Lấy code mẫu các ngôn ngữ trên Postman: Link code mẫu.

  • Sử dụng API Checkcode để kiểm tra code có hợp lệ hay không. Xem API check code ở link sau đây: API Checkcode.

Last updated