OneRoute
  • Introduction
  • Prerequisites
  • Whatsapp API
    • Sandbox (Test API Key)
    • Getting Started
    • Endpoints
      • Fetch Channels
      • Fetch Channel Templates
      • Send Template Message
      • Send Campaign Message
      • Send Session Message
    • FAQ
  • EMAIL API
    • Getting Started
    • Endpoints
      • Fetch Email Channels
      • Send Email to Customers
  • SMS API
    • Getting Started
    • Endpoints
      • Fetch SMS Channels
      • Send SMS to Customers
      • Send OTP SMS to Customers
      • Fetch SMS Messages
      • Get SMS DLR Message
  • ONEOTP API
    • Getting Started
    • Endpoints
      • Fetch OTP Templates
      • Send OTP
      • Verify OTP
  • EMBED
    • Getting Started
    • Installation
    • Push Notification
  • OTHERS
    • Receiving Events - Webhooks
    • Fetch Channel By Id
    • Fetch Logs
Powered by GitBook
On this page
  • Verify OTP
  • Verify with USSD

Was this helpful?

  1. ONEOTP API
  2. Endpoints

Verify OTP

Verify OTP

POST https://api.oneroute.io/api/oneotp/verify

Use this endpoint to verify that the customer entered the same OTP that was sent with the Send OTP endpoint.

Headers

Name
Type
Description

apikey

string

API key, for Authentication.

Request Body

Name
Type
Description

key

string

Verification Key, from the Send OTP request.

otp

string

OTP to verify

identifier

string

email or phone number the OTP was sent to

{
    "message": "Otp verified successfully",
    "body": {
        "status": "Success",
        "response": "OTP Matched"
    },
    "success": true
}
{
    "data": null,
    "message": "OTP already used!!",
    "success": false
}
{
    "data": null,
    "message": "Invalid API Key",
    "success": false
}

Verify with USSD

Webhook Payload Sample

{
    "id": "63d45b42-0898-43b3-b81d-1fb2d45bc78f",
    "otp": "1234",
    "identifier": "+234XXXXXXXX",
    "expiration_time": "1941-06-22T16:36:45.742Z"
    "createdAt": "1941-06-22T16:36:45.742Z"
}
PreviousSend OTPNextGetting Started

Last updated 3 years ago

Was this helpful?

When you include USSD as one of your preferred OneOTP channels, your customers can verify their OTP by dialing your USSD code which you can find on your .

Once verification is complete, a notification will be sent to the webhook urlconfigured on your to notify you that the OTP has been verified successfully.

Account Settings Page
Account Settings Page