Skip to content
neat-soft edited this page Feb 11, 2019 · 1 revision

Welcome to the node-express-mysql-sequelize wiki!

Pipdroid API document

prefix: /api

Auth apis

User Signup
User Login
Forgot Password
Validate Reset Password Token
Reset Password
Change Password
Resend Verification Email
Email Verify


Auth apis details

User Signup

User signup, send verification mail.

 POST /auth/signup

QUERY PARAMS

Name Type Mandatory Description
email String YES User email
password String YES User password. (min 8 chars, strong password)

RETURN

  • Success Result
    status code: 200

    {
        "result": "ok",
        "data": {
            
        }
    }
  • Failed Result
    status code: 400

    {
        "result:": "error",
        "message": error_string
    }

User Login

User login.

 POST /auth/login

QUERY PARAMS

Name Type Mandatory Description
email String YES User email
password String YES User password. (min 8 chars, strong password)

RETURN

  • Success Result
    status code: 200

    {
        "result": "ok",
        "data": {
        }
    }
  • Failed Result
    status code: 400

    {
        "result:": "error",
        "message": error_string
    }

Forgot Password

Forgot User Password. Receive rest password token into Email

 POST /auth/forgot-password

QUERY PARAMS

Name Type Mandatory Description
email String YES User email

RETURN

  • Success Result
    status code: 200

    {
        "result": "ok",
        "data": "We sent reset password token to your email"
    }
  • Failed Result
    status code: 400

    {
        "result:": "error",
        "message": error_string
    }

Validate Rest Password Token

Check if reset password token is valid.

 POST /auth/validate-reset-password

QUERY PARAMS

Name Type Mandatory Description
email String YES User email
resetPasswordToken String YES resetPassword token received in email

RETURN

  • Success Result
    status code: 200

    {
        "result": "ok",
    }
  • Failed Result
    status code: 400

    {
        "result:": "error",
        "message": error_string
    }

Reset Password

Update User Password.

 POST /auth/reset-password

QUERY PARAMS

Name Type Mandatory Description
email String YES User email
resetPasswordToken String YES resetPassword token received in email
newPassword String YES User new password

RETURN

  • Success Result
    status code: 200

    {
        "result": "ok",
        "data": "Your new password has been set successfully"
    }
  • Failed Result
    status code: 400

    {
        "result:": "error",
        "message": error_string
    }

Change Password

Change User Password._

 POST /auth/change-password

BODY PARAMS

Name Type Mandatory Description
newPassword String YES User new password

RETURN

  • Success Result
    status code: 200

    {
        "result": "ok",
        "data": "Your new password has been set successfully"
    }
  • Failed Result
    status code: 400

    {
        "result:": "error",
        "message": error_string
    }

Resend Verification Email

Resend Verification Email.

 POST /auth/verificatio-nemail

QUERY PARAMS

Name Type Mandatory Description
email String YES User email

RETURN

  • Success Result
    status code: 200

    {
        "result": "ok",
        "message": "Verification email sent"
    }
  • Failed Result
    status code: 400

    {
        "result:": "error",
        "message": error_string
    }

Email Verify

Email Verify.

 GET /auth/confirm-email

QUERY PARAMS

Name Type Mandatory Description
token String YES Email verification token received in email

RETURN

  • Success Result
    status code: 200

    {
        "result": "ok",
        "message": "Email verified. Your account is active now"
    }
  • Failed Result
    status code: 400

    {
        "result:": "error",
        "message": error_string
    }