How to create new OTP app ?
Navigate to OTP Applications -> Manage ->
Click on one of your App's 'Configuration' button
assign below with yours
YOUR_OTP_ACCESS_TOKEN = access token
YOUR_OTP_APP_ID = app_id
https://www.cognalys.com/api/v1/otp/?app_id=YOUR_OTP_APP_ID&access_token=YOUR_OTP_ACCESS_TOKEN&mobile=MOBILE
MOBILE = + country code + mobile number ( eg : +918xxx903xxx )
Response
Parameter | Meaning |
status | success or failed |
keymatch | if status is success server will return a keymatch to hit second api for verifying number |
mobile | if status is success or failed , Server will return the mobile number you requested to verify |
otp_start | it returns only when status is success . This will help you to ask your user to type only the last 5 digit of missed call mobile number as OTP |
codes | if status is failed . Will return a list/array or errors ( eg : [ App id is missing or not valid, ] |
II. Confirming the number verification
https://www.cognalys.com/api/v1/otp/confirm/?app_id=YOUR_OTP_APP_ID&access_token=YOUR_OTP_ACCESS_TOKEN&keymatch=KEYMATCH&otp=OTP
KEYMATCH = the keymatch value you got from first api jus before
OTP = 10 digit missed call OTP number.
Response
Parameter | Meaning |
status | success or failed |
message | if status is message ( eg: Verified ) |
mobile | if status is success or failed , Server will return the mobile number you requested to verify |
otp_start | it returns only when status is success . This will help you to ask your user to type only the last 5 digit of missed call mobile number as OTP |
codes | if status is failed . Will return a dict/{} of errors with key as error code and value as description ( eg : { 301 : App id is missing or not valid,} ) |