POST Login
This endpoint allows users to log in by providing their email and password.
http://127.0.0.1:8080/user/login
Body raw (json)
The request body should contain the following information:
{
"email": "adelayman0000@gmail.com",
"password": "123456"
}
- "email": The email address associated with the user's account.
- "password": The password provided by the user for authentication.
Response
{
"status": true,
"data": {
"userID": "63d5b2c8db392954ecae9737",
"userToken": "TOKEN",
"userName": "Adel Ayman",
"email": "adelayman0000@gmail.com",
"isVerified": true,
"fcmToken": "YOUR_FCM_TOKEN"
},
"message": "Login done successfully"
}
Upon successful login, the API will respond with a status of true and provide user-related data, including the
- "userID": The unique identifier associated with the user.
- "userToken": A token generated by the server that represents the authentication and authorization of the user. This token is typically used to authenticate subsequent requests from the client to access protected resources.
- "userName": The name of the logged-in user.
- "email": The email address associated with the user's account.
- "isVerified": Indicates whether the user's account is verified (true) or not (false).
- "fcmToken": The FCM (Firebase Cloud Messaging) token associated with the user.
userToken: is a token generated by the server that represents the authentication and authorization of the user. This token is typically used to authenticate subsequent requests from the client to access protected resources