Loading...

Knowledge Base

Verify a Customer OTP Using the API

When you want to authenticate a customer OTP using the API. This article explains supported OTP verification types, required parameters, and response details for SMS and Google Authenticator-based customer authentication.

Verify OTP

Description

Authenticates the Customer OTP token.

Parameters

NameData TypeRequired / OptionalDescription
auth-useridIntegerRequiredAuthentication Parameter
api-keyStringRequiredAuthentication Parameter
customeridIntegerRequiredCustomer ID of the Customer
otpStringRequiredOTP sent to the Customer
typeStringOptionalThe type of authentication
  • Sms
  • gauth
  • gauthbackup

If no value is passed type=sms by default.

HTTP Method

POST

Example Test URL Request

https://test.httpapi.com/api/customers/authenticate/verify-otp.json?auth-userid=0&api-key=key&customerid=0&otp=987654&type=gauth

Response

Returns true (Boolean), if the OTP token is authenticated.

In case of any errors, a status key with value as ERROR alongwith an error message will be returned.