GetOTP Documentation

OTP Verification

Developer can verify each OTP status via this endpoint.

OTP Verification Request

To verify OTP, make a GET request to our Verify OTP endpoint. Take note that our OTP endpoint ending with trailing slash:

https://otp.dev/api/verify/{otp_id}/

With the following Basic HTTP authentication method:

Description Required Data Type Example
Your API Key Yes String mtbi2w4hlendfpxa1igthcu5p6mzxf7k
Your API Token Yes String mpktanoshzf4c81e3bydjl76ixr9wugv

Note

  • Grab your API key and API token from this page
  • You can create maximum 3 count of API keys

Examples

Below is an example request using cURL:

curl -L -X GET 'https://otp.dev/api/verify/ttnnkgggvjef7euc72j8/' \
-u 'mtbi2w4hlendfpxa1igthcu5p6mzxf7k:mpktanoshzf4c81e3bydjl76ixr9wugv'

The response would be a JSON structure, returned with HTTP 200 Code status code:

{
  "callback_url": "http://mysite.test/payments/callback",
  "success_redirect_url": "http://mysite.test/payments/65/success",
  "fail_redirect_url": "http://mysite.test/payments/65/failed",
  "otp_id": "ttnnkgggvjef7euc72j8",
  "status": [
    {
      "channel": "email",
      "auth_status": "not_verified"
    }
  ],
  "channels": [
    "email"
  ],
  "creation_time": "2021-07-07T08:26:41.952690Z"
}