📲Send OTP


Send OTP

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

Headers

Name
Type
Description

Content-Type

string

application/json

Authorization

string

Bearer <access-token>

Request Body

Name
Type
Description

phone_number

string

The Egyptian mobile phone number 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': '<string>',
    'trials_remaining': '<int>'
}

Code Snippets

import requests
import base64

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

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

Last updated