Step 1: Sign Up & Log In
- Go to Message Central Signup
- Create your free account
- Use your free credits to test and play around with OTPs
Step 2: API Integration (Devs, Assemble!)
We’ve kept things super simple. Copy a few code snippets and you’ll be testing in no time.
Prefer watching over coding? Our quick video guide has you covered.
API Parameter for Verify Now
The following parameters need to be sent while using VerifyNow APIs.
RCS/SAUTH
Rest API Base URLs
All Platform API endpoints below should be prefixed with the following URL:
https://cpaas.messagecentral.comGenerate Token
When using Verify Now’s SMS verification API to send SMS verification codes, the initial call should be to the token generation API.
This API returns a token that must be included in all subsequent calls. An authentication token is needed to validate the user and should be included in the header section of each request.
Request URL Path:
/auth/v1/authentication/tokencURL
1curl --location 'https://cpaas.messagecentral.com/auth/v1/authentication/token?
2customerId=%3CCustomerId%3E&key=%3CBase64%20Encrypted%20password%3E&scope=NEW&country=91
3&email=test%40messagecentral.com' \
4--header 'accept: */*'
NOTE: To convert a cURL command into code using Postman, open Postman, import the cURL command via the "Import" button, and then generate the code in your preferred language by clicking the "Code" button on the right side of the request.
Response JSON
1{
2 "status": Integer,
3 "token": "String"
4}Code Example
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://cpaas.messagecentral.com/auth/v1/authentication/token?customerId=<CustomerId>&key=<Base64 Encrypted password>&scope=NEW&country=91&email=test@messagecentral.com")
.method("GET", body)
.addHeader("accept", "*/*")
.build();
Response response = client.newCall(request).execute();var request = require('request');
var options = {
'method': 'GET',
'url': 'https://cpaas.messagecentral.com/auth/v1/authentication/token?customerId=<CustomerId>&key=<Base64 Encrypted password>&scope=NEW&country=91&email=test@messagecentral.com',
'headers': {
'accept': '*/*'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://cpaas.messagecentral.com/auth/v1/authentication/token?customerId=<CustomerId>&key=<Base64 Encrypted password>&scope=NEW&country=91&email=test@messagecentral.com');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'accept' => '*/*'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}import requests
url = "https://cpaas.messagecentral.com/auth/v1/authentication/token?customerId=<CustomerId>&key=<Base64 Encrypted password>&scope=NEW&country=91&email=test@messagecentral.com"
payload = {}
headers = {
'accept': '*/*'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("https://cpaas.messagecentral.com/auth/v1/authentication/token?customerId=<CustomerId>&key=<Base64 Encrypted password>&scope=NEW&country=91&email=test@messagecentral.com")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "*/*"
response = https.request(request)
puts response.read_body
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://cpaas.messagecentral.com/auth/v1/authentication/token?customerId=<CustomerId>&key=<Base64 Encrypted password>&scope=NEW&country=91&email=test@messagecentral.com");
request.Headers.Add("accept", "*/*");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());Send OTP
To sendOtp on a mobile number below are the request parameters. The authentication token is required to send OTP which is generated by the generated token API (which you can find above in Introduction section).
Request URL Path:
A successful response will return a 200 status code.
/verification/v3/sendRequest URL Parameters:
cURL
1curl --location --request POST 'https://cpaas.messagecentral.com/verification/v3/send?
2countryCode=91&flowType=SMS&mobileNumber=9999999999' \
3--header 'authToken:
4eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJDLTMzNDMyQTVGNDIGNzQwNCI6ImIhdCI6MTcxMjExOTA0MCwiZXhwIjo'
NOTE: To convert a cURL command into code using Postman, open Postman, import the cURL command via the "Import" button, and then generate the code in your preferred language by clicking the "Code" button on the right side of the request. You can change the flowType basis the channel of your choice.
Response JSON
1{
2 "responseCode": 200,
3 "message": "SUCCESS",
4 "data": {
5 "verificationId": "xxxx",
6 "mobileNumber": "xxxx",
7 "responseCode": "200",
8 "errorMessage": null,
9 "timeout": "60",
10 "smCLI": null,
11 "transactionId": "xxxx"
12 }
13}Code Example
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=9999999999")
.method("POST", body)
.addHeader("authToken", "eyJhbGciOiJIUzUxMiJ9.eyJzdWOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOTA0MCwiZXhw")
.build();
Response response = client.newCall(request).execute();
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=9999999999',
'headers': {
'authToken': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOTA0MCwiZXhw'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=9999999999');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'authToken' => 'eyJhbGciOiJIUzUxMiJ9.eyJzdWOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOTA0MCwiZXhw'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}import requests
url = "https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=9999999999"
payload = {}
headers = {
'authToken': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOTA0MCwiZXhw'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)require "uri"
require "net/http"
url = URI("https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=9999999999")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authToken"] = "eyJhbGciOiJIUzUxMiJ9.eyJzdWOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOTA0MCwiZXhw"
response = https.request(request)
puts response.read_bodyvar client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=9999999999");
request.Headers.Add("authToken", "eyJhbGciOiJIUzUxMiJ9.eyJzdWOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOTA0MCwiZXhw");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());Validate OTP
The validateOtp method is a REST API endpoint for validating a one-time password (OTP) for customers.
Request URL Path:
A successful response will return a 200 status code.
/verification/v3/validateOtp/- For multiple language support
- by default is English
- For now we support English only
cURL
1curl --location 'https://cpaas.messagecentral.com/verification/v3/validateOtp?
2&verificationId=2949&code=1476' \
3--header 'authToken:
4eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJDLTMzNDMyQTVGNDIGNzQwNCI6ImIhdCI6MTcxMjExOTA0MC'
NOTE: To convert a cURL command into code using Postman, open Postman, import the cURL command via the "Import" button, and then generate the code in your preferred language by clicking the "Code" button on the right side of the request.
Response JSON
A successful response will return a 200 status code.
1{
2 "responseCode": 200,
3 "message": "SUCCESS",
4 "data": {
5 "verficationId": "xxxx",
6 "mobileNumber": "xxxx",
7 "responseCode": "200",
8 "errorMessage": null,
9 "verificationStatus": "VERIFICATION_COMPLETED",
10 "authToken": null,
11 "transactionId": "xxxx"
12 }
13}Code Example
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=2949&code=1476")
.method("GET", body)
.addHeader("authToken", "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOT")
.build();
Response response = client.newCall(request).execute();var request = require('request');
var options = {
'method': 'GET',
'url': 'https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=2949&code=1476',
'headers': {
'authToken': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOT'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=2949&code=1476');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'authToken' => 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOT'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=2949&code=1476");
request.Headers.Add("authToken", "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOT");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
require "uri"
require "net/http"
url = URI("https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=9999999999")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authToken"] = "eyJhbGciOiJIUzUxMiJ9.eyJzdWOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOTA0MCwiZXhw"
response = https.request(request)
puts response.read_bodyvar client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=9999999999");
request.Headers.Add("authToken", "eyJhbGciOiJIUzUxMiJ9.eyJzdWOiJDLTMzNDMyQTVGNDlGNzQwNCIsImlhdCI6MTcxMjExOTA0MCwiZXhw");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());Response Codes
Need Help?
Need a hand? Our experts are available 24/7 to guide you through anything, anytime.
Support email: support@messagecentral.com
Frequently Asked Questions
1. How do I integrate VerifyNow OTP API with custom code?
You can easily integrate VerifyNow with your own codebase using Postman or any API testing tool. Use the POST method to send OTP SMS and the GET method to validate OTPs. You can generate example code in your preferred programming language directly from Postman.
2. Why am I getting the error “Method not Allowed” or error code 405?
You’d need to ensure that the endpoint URL for the Token API matches the one defined in the documentation. The same has been mentioned below: -
You can also refer to our video on API integration which explains the entire integration process in detail.
- Token API: GET
- Send API: POST
- Validate API: GET
Refer to the official integration video guide for step-by-step setup.
3. How can I test the VerifyNow SMS Verification APIs?
You can test all VerifyNow OTP and SMS verification APIs using Postman. Import the API collection, enter your credentials, and run sample requests to simulate OTP sends and validations before moving to production.
4. Why do I see a “Whitelabel Error” page when calling the API?
This usually means there’s an issue with your request packet or environment setup. Common reasons include:
- Incorrect API body or placeholder values
- Wrong CURL structure or missing headers
- Using the staging endpoint instead of production
Double-check your payload and endpoint URLs before retrying.
5. Why am I getting Error Code 401 (Unauthorized)?
Error 401 Unauthorized means your authToken or credentials are invalid. Make sure your token is correctly generated and added to the request header as described in the VerifyNow API documentation.
6. Why do I get Error Code 400 (“Bad Request”) in Postman?
Error 400 Bad Request typically indicates an issue with parameters or headers. Check for:
- Missing required parameters in the API body
- Incorrect authToken
- Wrong content type (use application/x-www-form-urlencoded)
7. How do I generate an authToken in VerifyNow API?
You can generate your authToken using the GET Token API:
- Locate your key in the API console
- Encode it using Base64
- Replace the placeholder value in the Key field
- Hit the GET Token API to receive your authToken
8. Where should I use the authToken in VerifyNow APIs?
The generated authToken must be added to the header of your SEND API requests. This authenticates your OTP request and ensures secure communication between your application and VerifyNow.
9. Which parameters should I modify in the GET Token API?
When generating an authToken, update the following fields:
- country
- customerid
- key
When generating an authToken, update the following fields:
10. Which parameters should I change in the SEND API?
When sending an OTP, make sure to replace:
- countrycode
- customerid
- otplength
- mobilenumber
These ensure your OTPs are sent to the correct user and region.
