(Quick Reference)

Register

  • Path : /api/register/user
  • Parameters :
    • String username
    • String email
    • String password
    • String password2
    • String name
    • String website
    • String aboutMe;
    • String location;
  • REST method : POST
  • Request :

http://indiabiodiversity.org/api/register/user?email=username@gmail.com&password=password&password2=password&name=User
  • Response :
    • Successful response :

Upon successful registration following response is sent and a verification link is sent at the given address along with a registration code.

{
    "success": true,
        "status": 200,
        "msg": "Welcome user Devaki. A verification link has been sent to devaki.anugu1@gmail.com. Please click on the verification link in the email to activate your account."
}
    • in case of error

{
    "success": false,
        "status": 200,
        "msg": "Failed to register the user because of the following errors: [{field=email, message=This email id is already registered.}]",
        "errors": [
        {
            "field": "email",
            "message": "This email id is already registered."
        }
    ]
}

Resend the verification email

  • Path : /api/register/resend
  • *Parameters" :
    • email
  • Rest Method : GET
  • Request :

http://indiabiodiversity.org/api/register/resend?email=username@gmail.com
  • Response :
    • on success

{
    "success": true,
        "status": 200,
        "msg": "Successfully sent verification email to 123@gmail.com. Please check your inbox."
}
    • in case of error

{
    "success": false,
        "status": 200,
        "msg": "Registration code for the email address devaki.anugu@gmail.com is not found",
        "errors": []
}

Forgot Password

  • Path : /api/register/forgotPassword
  • *Parameters" :
    • email
  • REST Method : POST
  • Request :

http://indiabiodiversity.org/api/register/forgotPassword?email=username@gmail.com
  • Response :
    • on success

{
    "success": true,
        "status": 200,
        "msg": "An email has been sent to pearlsravanthi@gmail.com. Please click on the link in the email."
}
    • in case of error

{
    "success": false,
        "status": 200,
        "msg": "No user was found with that email",
        "errors": []
}