Docs home

Signup OTP Send for Contact Number

Sends a one-time code to a new learner's phone (and email, if given) to verify it before sign-up. Use it on a sign-up form; the code is then submitted with the sign-up request.

POST/user/otp
Signup OTP Send for Contact Number
curl --request POST \
  --url 'https://<your-api-host>/nuSource/api/v1/user/otp' \
  --form 'JSONString={"institution_id":<institutionId>,"contact_number_country_id":"103","contact_number":"9265075346"}'
{
  "code": 200,
  "message": "Success"
}

Access: Public, no API key.

Request body: form-data with one field, JSONString, containing this JSON:

BodyJSONString
contact_numberstringOne of contact_number or email
Mobile number without country code, 4 to 12 digits.
emailstringOne of contact_number or email
Email address. Also gets the code.
Country of the number. Defaults to the caller's country by IP (India, 103, if unknown).
Institute to sign up with. Defaults to the institute of the API host you call.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Success

Notes:

  • The code is 6 digits and valid for 30 minutes; a new request cancels earlier codes.
  • SMS is sent only when the request comes from a country allowed for SMS; otherwise only the email gets the code.
  • Errors: "Please enter a valid mobile number.", "Number already registered. Please login if you have an account", "Email already registered. Please login if you have an account", "Ops! send otp currently disabled." (sign-up SMS turned off), "OTP NOT SEND PLEASE CONTACT ADMIN" (neither SMS nor email could be sent), and an error when sign-up is not allowed from this platform.
  • Rate limit: 10 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI