Verify OTP for Contact Number
Checks the one-time code sent by SMS to a mobile number and returns a short-lived token that proves the number was verified. Step 2 of OTP signup with a mobile number.
POST
/user/verify/otpVerify OTP for Contact Number
curl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/user/verify/otp' \
--form 'JSONString={"otp":"102030","contact_number":"8789788971"}'{
"code": 200,
"message": "Success",
"verify_token": "403f0f4eeb7feb24d5739fbe4f6cc3e0681d4fc45b1ac0b6bdf5165607c77529"
}Access: Public, no API key needed.
Request body: form-data with one field, JSONString, containing this JSON:
Body
JSONStringThe code the user received.
Email the code was sent to.
Mobile number the code was sent to.
email_only_otpinteger
1 checks the code against email even when contact_number is also sent.email_otpstring
When verifying a mobile number and an email together, the code sent to the email. Both codes must match.
If only email is sent, the code is checked against the email. Otherwise it is checked against contact_number.
Notes: Fails with "Invalid OTP. Please try again." for a wrong or expired code, and "Email or contact number is required." if both are missing. Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.