OTP SMS API


Send OTP SMS via API in India without any registration from Fast2SMS. In India we are the best bulk otp sms provider.


To Send OTP SMS via API process is:


1. Signup at Fast2SMS
2. Click on OTP SMS



3. Copy your API Key & generate your code




Below you can see how your OTP SMS will look like:





OTP SMS API Code


Our OTP SMS API work with PHP, JAVA, C#, C, Python, Ruby, Javascript, NodeJS, etc. Secure, robust and easy to integrate APIs to send OTP SMS, DLT SMS, Promotional SMS, Service Implicit SMS, Service Explicit SMS.

Check SMS API documentation file
Watch this video for help: https://www.youtube.com/watch?v=r9PWb5VPbl0

OTP SMS Authorization Key


Fast2SMS expects for the API Key to be included in all API requests to the server in a header for POST requests & in query parameters for GET requests.

Get Your API Authorization Key from Fast2SMS Dev API section for FREE which you need to add in each API request as following:

GET https://www.fast2sms.com/dev/bulkV2?authorization=YOUR_API_KEY&variables_values=5599&route=otp&numbers=8888888888

POST authorization: YOUR_API_KEY

You must replace YOUR_API_KEY with your Fast2SMS account API Authorization Key which look like this: "weBQKBrtZzLnD2ZUEnUYJIO40zZGnjgZm3BA1SAUd0qZ56gHm0k3X45DWR9c"


OTP SMS API


You can use OTP SMS API for sending Numeric based OTP SMS.

In this route you can pass OTP value & Fast2SMS will deliver your SMS as: "Your OTP: {#var#}"

GET Method

GET https://www.fast2sms.com/dev/bulkV2


Following are the parameter to be used for GET API:


HTTP Request

GET https://www.fast2sms.com/dev/bulkV2



Body
Parameter Required Description
authorization true Provide "YOUR_API_KEY". Sign up for API Key
variables_values true Pass OTP value like: "5599"
(only numeric value is allowed upto 10 digit)
Your SMS will be delivered as: Your OTP: 5599
route true For OTP SMS use "otp"
numbers true You can send multiple mobile numbers seperated by comma like: "8888888888,9999999999,6666666666"
flash false This field is optional, it will use "0" as default value or you can set to "1" for sending flash message.

POST Method

POST https://www.fast2sms.com/dev/bulkV2


Following are the parameter to be used for POST API:

HTTP Request

POST https://www.fast2sms.com/dev/bulkV2

Headers
Parameter Required Description
authorization true Provide "YOUR_API_KEY". Sign up for API Key
variables_values true Pass OTP value like: "5599"
(only numeric value is allowed upto 10 digit)
Your SMS will be delivered as: Your OTP: 5599
route true For OTP SMS use "otp"
numbers true You can send multiple mobile numbers seperated by comma like: "8888888888,9999999999,6666666666"
flash false This field is optional, it will use "0" as default value or you can set to "1" for sending flash message.


Below is example of otp sms api code in php language:

<?php

$fields = array(
    "variables_values" => "5599",
    "route" => "otp",
    "numbers" => "9999999999,8888888888,7777777777",
);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.fast2sms.com/dev/bulkV2",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_SSL_VERIFYHOST => 0,
  CURLOPT_SSL_VERIFYPEER => 0,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode($fields),
  CURLOPT_HTTPHEADER => array(
    "authorization: YOUR_API_KEY",
    "accept: */*",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}


OTP SMS Pricing



You can start sending OTP SMS from ₹100 and if your SMS volume requirement is high, then you can send per OTP SMS in ₹0.11 (which is lowest in SMS industry).
Per SMS cost depends on amount value, below table help you to understand:


How you can use OTP SMS API


You can use our bulk OTP sms api for your website app, login authentication, for ecommerce, banking, school, college, business activity. We do not allow spam, fraud, adult and illegal websites, apps to use our sms api. If you use our api for such websites, apps then your account will get disabled.

Related search: otp sms service provider, otp sms template, otp sms without dlt, sms otp authentication, otp bulk sms otp sms generation in php python java javascript asp.net c# node js



Watch below video for HELP: