Follow

Generate OTP with Cloud API

CommzGate Cloud SMS provides a set of functions for mobile message sending and receiving exposed as HTTP-based APIs.

 

The HTTP request should contain the SMS details as query parameters, such as ID, Password, Mobile, Message, Type, OTP, etc.

A sample HTTP (or HTTPS) request would be as follows,

https://www.commzgate.net/gateway/SendMsg?ID=00000000&Password=XXXXXXXXX&Mobile=65xxxxxxxxx&Type=A&Message=Hello+world

 

To generate an OTP with our API, all you need is the additional parameter, OTP.

A sample HTTP (or HTTPS) request for OTP would be as follows,

https://www.commzgate.net/gateway/SendMsg?ID=00000000&Password=XXXXXXXXX&Mobile=65xxxxxxxxx&Type=A&Message=Your+Password+is+*OTP*&OTP=true

 

Our CommzGate Cloud SMS API looks for the placeholder *OTP* in your message content, and replace this with a randomly generated 5-digit number (the OTP).

This same OTP 5-digit number will be appended to the Return String that is returned to your requesting application, after the Message ID, separated by a comma. 

 

You can use this OTP value returned to you to compare against the input value submitted by the mobile recipient.

0 Comments

Please sign in to leave a comment.