Ready to secure your transactions with SMSGatewayCenter’s OTP SMS API? This powerful tool generates and delivers one-time passwords instantly, perfect for 2FA or user verification. Let’s walk through the integration process step-by-step!
Integration Steps #
- Get Your Credentials: Log in to your SMSGatewayCenter account, head to the API section, and grab your
userId
,password
, andsenderId
(ensure it’s DLT-registered for compliance). - Choose Your Method: Use POST or GET requests. Endpoint: https://unify.smsgateway.center/SMSApi/otp.
- Set Up Parameters: Include required fields like
userId
,password
,mobile
(e.g.,919876543210
),msg
(e.g.,Your OTP is $otp$
),codeLength
(e.g.,4
), andsendMethod=generate
. Example (PHP with cURL):
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://unify.smsgateway.center/SMSApi/otp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => "userid=YourUserName&password=YourPassword&mobile=919876543210&msg=Your OTP is $otp$&codeLength=4&sendMethod=generate",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
- Test the API: Send a test OTP and check the response (e.g.,
status: success
,transactionId
). - Implement Verification: Use
sendMethod=verify
with theotp
value entered by the user to validate.
Best Practices
- Register OTP templates with DLT for compliance.
- Set
codeExpiry
(e.g., 60 seconds) to limit OTP validity. - Use HTTPS to secure data transmission.
Support
Need assistance? Reach out to contact @ smsgatewaycenter.com or call +912228657726.