Back to explore

auth

OTP

Credits: 0.000001

Generate

POST /v1/otp/Generate

Generate an OTP (one time pass) code

Request

expirynumber

expiration in seconds (default: 60)

idstring

unique id, email or user to generate an OTP for

sizenumber

number of characters (default: 6)

Response

codestring

one time pass code

Request

Response

{
    "code": "656211"
}

Credits: 0.000001

Validate

POST /v1/otp/Validate

Validate the OTP code

Request

codestring

one time pass code to validate

idstring

unique id, email or user for which the code was generated

Response

successboolean

returns true if the code is valid for the ID

Request

Response

{
    "success": true
}