Generate and Send OTP

Generates a numeric OTP and sends it to the specified mobile number via SMS,
using the Reseller-tier OTP service. The OTP is injected into the message
template using the %m escape character.

Authentication: Query-parameter based — username + password.


How %m works:

You send (decoded)Recipient receives
Your one time OTP is %mYour one time OTP is 53105

URL-encoding note: % must be encoded as %25 in a query string,
so %m becomes %25m. Example: msg=Your%20one%20time%20OTP%20is%20%25m


Example Request (from your listed URL):

GET https://api.rmlconnect.net/OtpApi/generatesms
  ?username=xxx-xxx
  &password=xxxx
  &msisdn=xxxx
  &msg=Your%20one%20time%20OTP%20is%20%25m
  &source=xxxxx
  &tagname=ENSURESERV
  &otplen=5
  &exptime=60

Success Response Format (plain text):

1701|<destination>|<message_id>

Tier-Aware Credit Errors:

  • 1025 → End User credit exhausted
  • 1026 → Reseller credit exhausted
  • 1027 → Distributor credit exhausted
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

Reseller account username.

password
required

Reseller account password.

string
required

Mobile number (with country code) to which the OTP should be sent.

integer
required

OTP validity duration in seconds. After this period, verification
will return 102 (expired).

string
required

Message template containing the %m escape character, which is
replaced by the generated OTP. Message must be URL-encoded.
Missing the %m placeholder returns error 1705.

string
required

Sender ID assigned for this user/account.

integer
required
≥ 4

Number of digits in the generated OTP. Configurable by the
customer/account — there's no fixed upper limit, but the
minimum allowed length is 4 digits.

ValueSample OTP
4 (minimum)8492
584921
6849213
string

Optional identifier name for this OTP batch — useful for tracking
and reporting on specific OTP use cases (e.g. login, payment
confirmation, registration).

Responses

400

Bad request — one or more required parameters missing.

401

Authentication failure.

500

Internal server error. Contact support if this persists.

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain