Documentation
  • Introduction
  • ⚡Quick Guide
  • APIs
    • 🇦🇪UAE Resident ID OCR
    • 🔑OAuth Token
    • 🆔National ID OCR
      • 🔁API Response
    • 🧑‍💼Face Match
      • Face Match (Two Images)
      • Face Match (Image & Transaction ID)
    • ✈️Passport
    • ✈️Libyan passport
    • 🚗Car License
    • ↔️Transliteration
      • National ID Transliteration
      • Commercial Register Translation
      • Names Transliteration
    • 🏫Know Your Business (eKYB)
      • 📖Data Extraction & Verifications
        • Egyptian Commercial Register ID OCR
          • ✅With Verification
        • Egyptian Tax Card OCR
    • 📄Valify Sanction Shield
      • Sanction Shield v2.1.0
    • Sanction Shield v2.0.0
    • 🛡️Supported lists
    • ❓Transaction Inquiry
    • 📷Fetch Images
    • 🔒OTP
      • 📲Send Phone OTP
      • ✅Verify Phone OTP
      • 📥Send Email OTP
      • ✅Verfiy Email OTP
    • Response Data Validation
  • Error Codes
    • Valify Error Codes
    • HTTP Codes
  • References
Powered by GitBook
On this page
  • Send OTP
  • Code Snippets
  1. APIs
  2. OTP

Send Email OTP

Send OTP

POST https://valifystage.com/api/v1/otp/email/send/

Headers

Name
Type
Description

Content-Type

string

application/json

Authorization

string

Bearer <access-token>

Request Body

Name
Type
Description

email

string

The email to be sent an OTP.

bundle_key

string

A bundle key provided to you by Valify.

lang

string

The error message language.

{
    "result": {
        "success": true
    },
    "transaction_id": <str>,
    "trials_remaining": <str>
}
  
{
    "message": "Bad Request – invalid request received (e.g. missing Bundle key, required parameters or invalid json) | Make sure all the required parameters are included"
}
{
    "message": "Unauthorized – your Bundle key is invalid"
}
{
    "message": "Forbidden – specified access_token could not be found"
}
{
    "message": "<error-description>",
    "error_code": <valify-error-code>
}
{
    "message": "Internal Server Error"
}

Code Snippets

import requests
import base64

token = '<token>' # Place your token here
data = {
    'bundle_key': '<bundle key>', # Place your bundle key here
    'email': '<email>', # Place the phone number here
    'lang': '<str>' # optional, default: en
}

r = requests.post("https://<base-url>/api/v1/otp/email/send/",
        json=data,
        headers={'Authorization': 'Bearer %s' % token}
    )
                      
print(r.json())
PreviousVerify Phone OTPNextVerfiy Email OTP

Last updated 2 months ago

🔒
📥