Cookie

Cookie consent

We use some essential cookies to make this website work. We'd like to set additional cookies to help us measure your experience when you view and interact with the website.

Cookie policy
OTP verification API

One-time UK SMS password verification

Postcoder enables you to add two-factor authentication to your customer workflows using SMS text messages. Reduce fake signups, impersonation and account takeovers by adding OTP verification to your website and app.

Your code is 532132. It expires in 5 mins.

Trusted by leading organisations worldwide
  • NHS customer logo
  • SKY customer logo
  • Kentucky Fried Chicken customer logo
  • Royal National Lifeboat Institution customer logo
  • Kwik Fit customer logo
  • USwitch customer logo
  • Legal and General customer logo
User-friendly authentication

OTP verification API

Postcoder OTP verification provides a user-friendly way to add an extra layer of protection to your services using SMS.

  • Delivers UK SMS one-time passcodes
  • No authenticator apps required
  • Ideal for users with UK mobile phones
POST /pcw/PCW45-12345-12345-1234X/otp/send
{
	"to": "07500%20123456",
	"from": "Example.com"
	"message": "Your code is [otp]. It expires in 5 mins."
	"otplength": 6
	"expiry": 5
}
----
{
	"id": "OTP45-12345-12345-1234X"
}
POST /pcw/PCW45-12345-12345-1234X/otp/verify
{
	"id": "OTP45-12345-12345-1234X",
	"otp": "532132"
}
----
{
	"valid": true
}
Sign up for an account
We will verify your mobile number to create a 2-step verification for your account.
Name
Jo Smith
Email address
josmith100@gmail.com
Mobile number
07500 123456
Submit details
Account verification
Please enter the code sent to ***** ***456
5
3
2
1
3
2
Submit details
Success!!
Your account has been verified.
Log in

Your code is 532132.

It expires in 5 mins.

"60% of consumers intentionally provide incorrect information when submitting their details online."

Source: Verve Research
Verify, protect, trust

Enhance security with Postcoder OTP verification

  • Verify one-time passwords in real-time

    Postcoder instantly checks if a one-time password (OTP) is correct and within its expiry time.

  • Customise OTP settings

    Postcoder lets you set the code length, sender name and SMS message content to suit your application and brand.

    Hello Jo, your security code is 532132. It will expire in 5 minutes. Do not share this code.

  • Control OTP expiry time

    Postcoder allows you to control how long each OTP remains valid, balancing user convenience with protection against misuse.

Authenticate users in real time

Secure and seamless authentication throughout your customer journey

  • Registration and onboarding

    Prevent fake account creation and increase conversions by signing up and onboarding real customers only.

  • Logging in

    Secure your authentication flows against account takeovers to maintain the security of customer accounts.

  • Confirming payments

    Safeguard high-value transactions and purchases using one-time passwords to minimise payment fraud.

  • Managing accounts

    Verify password resets, personal detail updates and any other account changes to protect customer data.

  • Recovering accounts

    Provide another way to recover accounts when customers lose access to the email address on their account.

  • Verifying mobile numbers

    Confirm customers have access to the phone number they provided to ensure you have a means to contact them.

Global scale

OTP verification at scale

Postcoder delivers the scale you need for global commerce. It provides lightning quick responses and supreme reliability wherever your customers are based.

  • 99.99%

    API uptime

Highly rated by customers

An award-winning API with top-tier performance, easy admin and great support

Customers love Postcoder according to independent user reviews on the world's most trusted software marketplace. Start a free trial and find out what you've been missing.

Simple, straightforward and easy to integrate

100% developer-friendly

An optimised developer experience

Get up and running with OTP verification in minutes using the quick start guide, sample code and API docs.

  • Handles spaces and non-numerics
  • Uses two API calls - send and verify (free)
  • Includes free multi-channel support
otp.js
otp.py
otp.php
otp.cs
// Prepare request URL
let url = `https://ws.postcoder.com/pcw/${key}/otp/send`

// Return JSON ♥
url += `?format=json`;

// Tag request for easy reporting
url += `&identifier=signup_form`;

// Prepare request body
let body = {
	to: `${user_mobile_number}`,
    from: `Example.com`,
    message: `Your code is [otp]. It expires in 5 mins.`,
    otplength: 6,
    expiry: 5
};
POST /pcw/PCW45-12345-12345-1234X/otp/send?format=json&identifier=signup_form

{
	"to": "07500%20123456",
    "from": "Example.com",
    "message": "Your code is [otp]. It expires in 5 mins.",
    "otplength": 6,
    "expiry": 5
}
----
SMS message sent to 00447500123456:

Your code is 532132. It expires in 5 mins.
Simplified admin

Buy credits, check usage and configure security with ease

Use the feature-rich admin area to set up and manage your account. It is natively mobile and desktop-friendly so whether you're updating a setting on the go or doing a deep-dive at your desk, it will be the same seamless experience. It supports dark mode too.

Powerful customer stories

Postcoder is trusted by over 9,000 organisations of all sizes

Postcoder helps organisations in the UK and worldwide achieve measurable improvements in their form conversions and data quality. After integrating Postcoder, many of them report increased onboarding numbers, faster form completion, and a surge in quality leads. Postcoder captures contact details you can rely on.

We wanted to offer the customer a stress-free journey when ordering products online.

Alex Woods, Victorian Plumbing