To make an authorized request, add the following header, where {token} is the access token, returned by the service upon successful login or registration:
Authorization:Bearer {token}
Create a new user by sending POST request to /api/v1/auth/register with properties name,email and password. The service returns an authorization token, that can be used for requests.
Login by sending a POST request with email and password to /api/v1/auth/login. The service will respond with an object, containing a standard string token, that can be used for requests.
Send an authorized GET request to /api/v1/auth/me The service will return the record of the user, associated with the passed-in session token.
Send an authorized PUT request to/api/v1/auth/updateddetails.
Send an authorized PUT request /api/v1/auth/updatepassword.
Send POST request /api/v1/auth/forgot-password
Send an authorized GET request to /api/v1/tasks The service will return the record of the user, associated with the passed-in session token.
Send an authorized GET request to /api/v1/tasks/{id}
Send an authorized POST request to /api/v1/tasks with properties name, completed(true or false)
Send an authorized POST request to /api/v1/tasks/{id}
Send an authorized DELETE request to /api/v1/tasks/{id}
Send an authorized GET request to /api/v1/users The service will return the record of the users, associated with the passed-in session token.
Send an authorized GET request to /api/v1/users/{id} The service will return user details, associated with the passed-in session token.
Send an authorized PUT request to /api/v1/users/{id} in the body send only the properties that need to be changed.
Create a new user by sending POST request to /api/v1/users with properties name,email and password.
Send an authorized DELETE request to /api/v1/users/{id}. The server will respond with "success": true and empty user object "user": {}