π₯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
data
object
Object containing the parameters below:
{
email: <str>,
bundle_key: <str>,
lang: <str>
}
Status Codes
{
"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())Last updated