Skip to main content

Account and session

Plan section 2.1 · Screens S01–S06, S62. Read Authentication and session first for the token rules.

Login​

POST/api/User/LoginAuthenticate
No token (public)Employee and team leaderP1Screens: S02

Signs in and returns the token plus the user's basic profile.

  • userName is usually the employee's mobile number. Trim spaces; the server trims too.
  • fcmToken: the device's Firebase token. When present it replaces the token stored for this user (push goes to the last device that logged in). Send null if you don't have one yet.
  • isPasswordChange: false → force Set new password before anything else.
  • isApprover: the employee's designation has "can approve" set. Combine it with the tenant setting to show Approvals (Server rules).
  • isClarify: the employee's designation uses clarification applications. Show the Clarification request type only when true (Clarification).
  • isJobSeeker: designation flag used by the recruitment module; the app does not need it.
  • profileImageUri is a full URL or empty.

Request

JSON body:

LoginDto

Field (JSON name)Type
userNamestring
passwordstring
fcmTokenstring
curl -X POST "$BASE_URL/User/LoginAuthenticate" \
-H "Content-Type: application/json" \
-d '{
"userName": "9876544821",
"password": "MyNewPass@2026",
"fcmToken": "fcm-device-token"
}'

Response

HTTP 200 with the standard envelope. responseData is AuthenticatedUserDto.

AuthenticatedUserDto

Field (JSON name)Type
idinteger
fullNamestring
userNamestring
profileImageUristring
tokenstring
employeeIdinteger
designationNamestring
isClarifyboolean | null
isJobSeekerboolean | null
isPasswordChangeboolean | null
isApproverboolean | null
Example response
{
"isSuccess": true,
"responseData": {
"id": 87,
"fullName": "Priya Sharma",
"userName": "9876544821",
"profileImageUri": "https://api-hrms.weblancertechnologies.com/Images/profile.jpg",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"employeeId": 142,
"designationName": "Senior Site Engineer",
"isClarify": false,
"isJobSeeker": false,
"isPasswordChange": true,
"isApprover": true
},
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “UserName or Password is incorrect.”
  • isSuccess: false · errorCode 1 “Your Account is currently blocked.”
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is null. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/UserController.cs → UserService.LoginAuthenticate · returns AuthenticatedUserDto

Change password​

POST/api/User/ChangePassword
Bearer tokenEmployee and team leaderP1Screens: S04, S62

Used for the forced first-login change (S04) and from Profile (S62).

  • id is the user id from login (not the employee id).
  • currentPassword is checked first; a wrong one returns Invalid Password.
  • Apply the password rules on the device (min 8 characters, a letter and a number). The server does not enforce them.
  • The response echoes the user record (password is always null). Keep using the current token (it stays valid).

Request

JSON body:

ChangePasswordDto

Field (JSON name)Type
idinteger | null
currentPasswordstring
passwordstring
curl -X POST "$BASE_URL/User/ChangePassword" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": 87,
"currentPassword": "9876544821",
"password": "MyNewPass@2026"
}'

Response

HTTP 200 with the standard envelope. responseData is UserDto.

UserDto

Field (JSON name)Type
idinteger | null
userNamestring
passwordstring
fullNamestring
roleRoleDto
profileImageUristring
isActiveboolean
companyIdCompanyDto[]
notificationIdsNotificationUserDto[]
fcmTokenstring
uniqueNamestring
Example response
{
"isSuccess": true,
"responseData": {
"id": 1045,
"userName": "priya.sharma",
"password": "MyNewPass@2026",
"fullName": "Priya Sharma",
"role": {
"id": 1045,
"company": {
"id": 1045,
"companyName": "Acme Infra Pvt Ltd",
"companyWebsite": "string",
"personName": "string",
"companyLegalName": "string",
"panCard": "string",
"tanCard": "string",
"address": "B-402, Shaligram Heights, Satellite, Ahmedabad 380015",
"contactNo": "9876544821",
"email": "priya.sharma@acmeinfra.in",
"isActive": true,
"pfNo": "string",
"pfGroup": "string",
"pfEstNo": "string",
"esicNo": "string",
"lwfNo": "string",
"ptNo": "string"
},
"roleName": "string",
"isActive": true
},
"profileImageUri": "https://api-hrms.weblancertechnologies.com/Images/profile.jpg",
"isActive": true,
"companyId": [
{
"id": 1045,
"companyName": "Acme Infra Pvt Ltd",
"companyWebsite": "string",
"personName": "string",
"companyLegalName": "string",
"panCard": "string",
"tanCard": "string",
"address": "B-402, Shaligram Heights, Satellite, Ahmedabad 380015",
"contactNo": "9876544821",
"email": "priya.sharma@acmeinfra.in",
"isActive": true,
"pfNo": "string",
"pfGroup": "string",
"pfEstNo": "string",
"esicNo": "string",
"lwfNo": "string",
"ptNo": "string"
}
],
"notificationIds": [
{
"id": 1045,
"userId": 87,
"notificationTypeId": 1
}
],
"fcmToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"uniqueName": "string"
},
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “User Not Found.”
  • isSuccess: false · errorCode 1 “Invalid Password”
  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is null. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/UserController.cs → UserService.IsValidCurrentPassword, UserService.UpdatePassword · returns UserDto

Forgot password: send code​

POST/api/User/SendResetPasswordOTP
No token (public)Employee and team leaderP1Screens: S03 step 1

Step 1 of forgot password. userName goes in the query string (the method is POST with no body).

  • The server looks up the employee whose mobile number equals userName and emails a one-time code to the employee's email address.
  • The code is 6 uppercase letters and is valid for 1 day.
  • Unknown mobile number: Invalid User Name.

Request

ParameterInTypeRequired
userNamequery stringstringyes
curl -X POST "$BASE_URL/User/SendResetPasswordOTP?userName=9876544821"

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

Example response
{
"isSuccess": true,
"responseData": false,
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “Reset Password OTP Email Template not Found. Please Contact Admin.”
  • isSuccess: false · errorCode 1 “Invalid User Name.”
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is false. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/UserController.cs → UserService.SendResetPasswordOTP · returns boolean

Forgot password: set the new password​

POST/api/User/ResetPasswordWithOTP
No token (public)Employee and team leaderP1Screens: S03 steps 2–3

Step 2 of forgot password. Send the same userName used in step 1, the code exactly as received (uppercase letters) and the new password.

  • Success: responseData is the text "Password Reset Successfully". Go to Login with the toast "Password reset. Please sign in."
  • Missing user name or code: User name and OTP are required.
  • Wrong or already used code, or a code for another user: Not Found. Code older than 1 day: OTP is Expired.
  • After 5 wrong codes in 15 minutes: Too many wrong attempts. Please request a new OTP. All pending codes are cancelled; offer Resend code (a new code also resets the counter).

Request

JSON body:

ResetPasswordInputDto

Field (JSON name)Type
userNamestring
verificationCodestring
passwordstring
curl -X POST "$BASE_URL/User/ResetPasswordWithOTP" \
-H "Content-Type: application/json" \
-d '{
"userName": "9876544821",
"verificationCode": "QKZTRM",
"password": "MyNewPass@2026"
}'

Response

HTTP 200 with the standard envelope. responseData is string.

Type: string

Example response
{
"isSuccess": true,
"responseData": "Password Reset Successfully",
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “User name and OTP are required.”
  • isSuccess: false · errorCode 1 “Too many wrong attempts. Please request a new OTP.”
  • isSuccess: false · errorCode 1 “Not Found”
  • isSuccess: false · errorCode 1 “OTP is Expired”
  • isSuccess: false · errorCode 1 “User Not Found.”
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is null. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/UserController.cs → UserService.ResetPasswordWithOTP · returns string

Companies the user can switch to​

POST/api/User/getUserCompany
Bearer tokenEmployee and team leaderP2Screens: S60

Lists the companies this user belongs to (POST with no body). Show Switch company only when the list has more than one item. Each item is the full company record; use id and companyName.

Request

No parameters and no body.

curl -X POST "$BASE_URL/User/getUserCompany" \
-H "Authorization: Bearer $TOKEN"

Response

HTTP 200 with the standard envelope. responseData is CompanyEntity[].

An array of CompanyEntity objects

Field (JSON name)Type
idinteger
uniqueNamestring (uuid)
createdByinteger | null
createdOnstring (date-time) | null
updatedByinteger | null
updatedOnstring (date-time) | null
tenantIdinteger | null
companyNamerequiredstring
companyWebsitestring
personNamestring
companyLegalNamestring
panCardstring
tanCardstring
addressstring
contactNostring
emailstring
isActiveboolean
pfNostring
pfGroupstring
pfEstNostring
esicNostring
lwfNostring
ptNostring
Example response
{
"isSuccess": true,
"responseData": [
{
"id": 1045,
"uniqueName": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"createdBy": 1,
"createdOn": "2026-11-23T00:00:00",
"updatedBy": 1,
"updatedOn": "2026-11-23T00:00:00",
"tenantId": 1,
"companyName": "Acme Infra Pvt Ltd",
"companyWebsite": "string",
"personName": "string",
"companyLegalName": "string",
"panCard": "string",
"tanCard": "string",
"address": "B-402, Shaligram Heights, Satellite, Ahmedabad 380015",
"contactNo": "9876544821",
"email": "priya.sharma@acmeinfra.in",
"isActive": true,
"pfNo": "string",
"pfGroup": "string",
"pfEstNo": "string",
"esicNo": "string",
"lwfNo": "string",
"ptNo": "string"
}
],
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

Source: HRMS.WebAPI/Controllers/UserController.cs → UserService.getUserCompany · returns CompanyEntity[]

Switch company​

POST/api/User/companyAuthenticateToken
Bearer tokenEmployee and team leaderP2Screens: S60

Returns a new login response with a new token for companyId (query string). Replace the stored token and session, then reload all data.

Request

ParameterInTypeRequired
companyIdquery stringintegeryes
curl -X POST "$BASE_URL/User/companyAuthenticateToken?companyId=2" \
-H "Authorization: Bearer $TOKEN"

Response

HTTP 200 with the standard envelope. responseData is AuthenticatedUserDto.

AuthenticatedUserDto

Field (JSON name)Type
idinteger
fullNamestring
userNamestring
profileImageUristring
tokenstring
employeeIdinteger
designationNamestring
isClarifyboolean | null
isJobSeekerboolean | null
isPasswordChangeboolean | null
isApproverboolean | null
Example response
{
"isSuccess": true,
"responseData": {
"id": 1045,
"fullName": "Priya Sharma",
"userName": "priya.sharma",
"profileImageUri": "https://api-hrms.weblancertechnologies.com/Images/profile.jpg",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"employeeId": 142,
"designationName": "Senior Site Engineer",
"isClarify": false,
"isJobSeeker": false,
"isPasswordChange": false,
"isApprover": true
},
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

Source: HRMS.WebAPI/Controllers/UserController.cs → UserService.companyAuthenticateToken · returns AuthenticatedUserDto

Thought of the day​

POST/api/User/GetTodayThought
No token (public)Employee and team leaderP3Screens: S10

Public (no token needed). Returns the quote from the server file wwwroot/Thoughts.json (the same for every tenant). If the file is missing: isSuccess: false, errorCode: 2, Thought not found!; hide the card.

Request

No parameters and no body.

curl -X POST "$BASE_URL/User/GetTodayThought"

Response

HTTP 200 with the standard envelope. responseData is ThoughtOfTheDay.

ThoughtOfTheDay

Field (JSON name)Type
thoughtstring
thoughtBystring
Example response
{
"isSuccess": true,
"responseData": {
"thought": "string",
"thoughtBy": "string"
},
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 2 Thought not found!
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is null. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/UserController.cs → UserService.GetTodayThought · returns ThoughtOfTheDay