SMS Verification API for OTP Authentication (Developer Integration Guide)

Integrate our SMS verification API to send OTPs, verify phone numbers, and enable secure authentication using simple REST APIs, SDKs, and code examples.

Verify Now API

What is an SMS Verification API?

An SMS verification API allows businesses to send one-time passwords (OTPs) via SMS to verify user identities during login, signup, or transactions. It enables secure phone number verification, OTP authentication, and two-factor authentication (2FA) by generating and validating codes in real time.Built for global scale, it ensures reliable OTP delivery using direct carrier connectivity, intelligent routing, and multi-channel fallback (SMS, WhatsApp, voice) helping businesses improve security and reduce authentication failures.

See OTP Pricing

How to Integrate an SMS Verification API (Step-by-Step)

tick-icon

 Step 1: Sign Up & Log In 

  1. Go to Message Central Signup 
  2. Create your free account 
  3. You’ll instantly get 1,000 free credits to test OTPs
📌  Tip: Use these credits to send test OTPs right away before going live.
tick-icon

Step 2: API Integration (Devs, Assemble!)

We’ve made this so simple you’ll think it’s cheating. Don’t worry, we’ve got ready-made code snippets so you can skip the boilerplate and jump straight to testing.

Not a code-reading fan? We’ve got a video tutorial that walks you through step by step.

Integrate SMS Verification APIs (V3) with Message Central

🔐 Learn how to authenticate users with SMS OTP APIs using Message Central in NodeJS, Python, Java, PHP, Ruby, and C#!

API Parameter for Verify Now

The following parameters need to be sent while using VerifyNow SMS Verification API:

API Parameter
Type
Value
flowType
String
SMS/WHATSAPP/RCS/SAUTH
type
String
OTP

Rest API Base URLs

All Platform API endpoints below should be prefixed with the following URL:

https://cpaas.messagecentral.com

Generate 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.

Field
Type
Mandatory?
Description
customerId
String
yes
Customer identifier (need to signup to get your  customer id)
country
String
no
Country code to send OTP to
email
String
no
Email
key
String
yes
Base-64 encrypted password
scope
String
no
Use ‘NEW’ for first time

Request URL Path:

/auth/v1/authentication/token

cURL

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}

Grab the Opportunity

If you are a developer or a web development agency, partner with us to accelerate your earnings.

Become a Partner
css-image

Send OTP

To send OTP  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).

API Parameter
Type
Mandatory?
authToken
String
Yes

Request URL Path:

A successful response will return a 200 status code.

/verification/v3/send

Request URL Parameters:

Field
Type
Mandatory?
Description
customerId
String
yes
Country code
otpLength
Integer
no
Send a number between 4 and 8. Default is 4
mobileNumber
String
yes
Mobile number for single text
flowType
String
yes
We send OTP using multiple mediums like SMS, WhatsApp, email, etc. For now, use either SMS or WhatsApp

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}

Validate OTP

The  validate OTP method is a REST API endpoint for validating a one-time password (OTP) for customers.

Request Header
Type
Mandatory?
authToken
String
Yes

Request URL Path:

A successful response will return a 200 status code.

/verification/v3/validateOtp/
Field
Type
Mandatory?
Description
verificationId
Long
yes
VerificationId from response of  /send  api
code
String
yes
otp
langid
String
no
Mobile number for single text
flowType
String
yes
  • 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}

Response Codes

Code
Display Text
200
SUCCESS
400
BAD_REQUEST
409
DUPLICATE_RESOURCE
500
SERVER_ERROR
501
INVALID_CUSTOMER_ID
505
INVALID_VERIFICATION_ID
506
REQUEST_ALREADY_EXISTS
511
INVALID_COUNTRY_CODE
700
VERIFICATION_FAILED
702
WRONG_OTP_PROVIDED
703
ALREADY_VERIFIED
705
VERIFICATION_EXPIRED
800
MAXIMUM_LIMIT_REACHED

Help and Support

For implementation support and any feedback, please reach out to us at: support@messagecentral.com

API User Guide

Download User Guide

Get a comprehensive Verify Now API Documentation
Download Now

Frequently Asked Questions

What is an SMS verification API?

An SMS verification API allows developers to send one-time passwords (OTPs) to users via SMS for authentication, phone number verification, and secure login workflows in web and mobile applications.

How does an OTP API work?

An OTP API works by generating a one-time password, sending it to the user via SMS or other channels, and verifying the code entered by the user to confirm identity during authentication.

How do I send OTP using an API?

To send OTP using an API, integrate a REST endpoint that generates a one-time password and sends it via SMS to a user’s phone number, followed by verification through a secure API call.

How long does it take to integrate an SMS verification API?

Most SMS verification APIs can be integrated within minutes using REST APIs, SDKs, and documentation, depending on your development environment.

Does VerifyNow provide SDKs and code examples?

Yes, VerifyNow offers developer-friendly SDKs, REST APIs, sample code, and documentation to help you quickly integrate OTP authentication into your application.

Why is my OTP not being delivered?

OTP delivery can fail due to carrier filtering, network issues, incorrect phone numbers, or unoptimized routing. Using direct carrier connections and fallback channels improves delivery success.

How can I improve OTP delivery rates?

You can improve OTP delivery by using optimized routing, compliant messaging infrastructure, and fallback channels such as WhatsApp or voice when SMS fails.

What is the best alternative to Twilio Verify API?

The best Twilio Verify API alternatives offer lower costs, faster integration, higher delivery success rates, and simpler infrastructure for SMS and OTP-based authentication.

Can I use OTP API for two-factor authentication (2FA)?

Yes, OTP APIs are widely used for two-factor authentication (2FA), enabling businesses to add an extra layer of security to user logins and transactions.

Can OTP authentication be used for passwordless login?

Yes, OTP authentication enables passwordless login by verifying users through one-time passwords instead of traditional passwords, improving both security and user experience.

Ready to get started?

Safeguard your user accounts and build trust with your customers using SMS verification. Try Verify Now without any credit card.