Skip to content
rahulyadav826870 edited this page Jul 15, 2022 · 1 revision

POST URL - /auth/register PARAMS

{ "name": "MASAI School", "email": "[email protected]" "password": "secret", "username": "masai-school", "mobile": "9876543210", "description": "A Transformation in education!" } RESPONSE Success (Status Code - 200)

{ "error": false, "message": "Registration Success" } Failure (Status Code - 200)

{ "error": true, "message": "Registration failed, user already exists" } Login POST URL - /auth/login PARAMS

{ "password": "secret", "username": "masai-school" } RESPONSE Success (Status Code - 200)

{ "error": false, "token": "cc4a5ce1b3df48aec5d22d1f16b894a0b894eccc" } Failure (Status Code - 401)

{ "error": true, "message": "Invalid login creadentials" } Profile GET URL - /user/ Requried Headers - Authorization: Bearer Success (Status Code - 200)

{ "name": "MASAI School", "email": "[email protected]", "username": "masai-school", "mobile": "9876543210", "description": "A Transformation in education!" } Error (Status Code - 401)

{ "message" : "Invalid token for the user" }# ## #

Clone this wiki locally