✅Verify Phone OTP
Verify OTP
Headers
Name
Type
Description
Request Body
Name
Type
Description
Notes
{
'verified': true
}{
"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": "Not Found"
}{
"message": "Unsupported Media Type"
}{
"message": "<error-description>",
"error_code": <valify-error-code>
}Code Snippets
import requests
import base64
token = '<token>' # Place your token here
data = {
'otp': '<6-digit otp>', # Place the received OTP here
'transaction_id': '<transaction id from "Send OTP">', # Place the transaction ID here
'bundle_key': '<bundle key>', #Place the bundle key here
'lang': '<str>' # optional, default: en
}
r = requests.post("https://valifystage.com/api/v1/otp/verify/",
json=data,
headers={'Authorization': 'Bearer %s' % token}
)
print(r.json())Last updated