Skip to main content
Version: 1.0.5

Login

The 'Login' API enables to authenticate users by verifying their credentials and granting them access to application based on valid credentials

Method: POST

{{URL}}/rpc/admin/UserService/GetToken

Headers

NameValue
Content-Typeapplication/json

Example

Request Parameters
ParameterDescription

emailid

Mandatory

String

Registered Username/email Id for login

Sample value: "admin@NetXD.com"

password

Mandatory

String

Password associated with the email Id

Sample value: "Abc@1234"

deviceID

Mandatory

String

Id of device for which login requested

Sample value: "917038"


curl --location '{{URL}}/rpc/admin/UserService/GetToken' \
--header 'Content-Type: application/json' \
--data-raw '{"emailid":"admin@NetXD.com","password":"Test@1234","deviceID":"917038"}'

Body


{
"emailid": "admin@NetXD.com",
"password": "Test@1234",
"deviceID": "917038"
}

Response: 200

Response Parameters
ParameterDescription

authResponse

Object

userName

String

Username associated with the account

Sample value: "admin"

JWT

String

JSON Web Token for authentication and authorization purposes

Sample value: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJTY29wZSI6IkFETUlOIiwiVXNlcklEIjoiMSIsIkxlZ2FsUmVwSUQiOiIiLCJDdXN0b21lcklEIjoiIiwiVXNlckVtYWlsIjoiYWRtaW5AbmV0c3lzLm9yZyIsIlRva2VuSUQiOiIiLCJVc2VyTmFtZSI6ImFkbWluIiwiQ3VzdG9tZXJOYW1lIjoiIiwiSnRpIjoiYmNhNTNiMjAxNmRlNDY1NWJhZThiMzgwNzZkMjQxOGIiLCJLZXkiOiIiLCJSb2xlcyI6W3sibmFtZSI6IlBMIiwicm9sZSI6IlJPTEVfU1VQRVJfQURNSU4ifSx7Im5hbWUiOiJQTCIsInJvbGUiOiJST0xFX0FETUlOIn1dLCJleHAiOjE2ODQ5MjE1NjMsImlzcyI6Imp3dC1hdXRoIiwic3ViIjoiVXNlciIsIlRva2VuRW5hYmxlZCI6ZmFsc2UsIlZlbmRvcklEIjoiIiwiQmFua05hbWUiOiIiLCJCYW5rSUQiOiIifQ.PB5QvKPPiBYalw6KcxkL3eEkl3XlxPBoxG0jQRCvJWc"

expirationTime

Number

Expiration time of the JWT, represented as a timestamp

Sample value: 1684921563

qrToken

String

QR token associated with the account

Sample value: "Ledger:None"

ip

String

IP address

Sample value: "42.111.165.238"

type

String

Type of user

Sample value: "ADMIN"

lastLoginTime

String

Indicates the timestamp of the user's last login

Sample value: "2023-05-24T08:12:41.494Z"

lastLoginIp

String

IP address used for the user's last login

Sample value: "106.51.2.218"

otpEnabled

Boolean

Specifies whether the user has enabled One-Time Password (OTP) authentication, with "false" indicating that it is disabled

Sample value: false

userRoles

String

Roles assigned to the user

Sample value: "ROLE_SUPER_ADMIN,ROLE_ADMIN"


{
"authResponse": {
"userName": "admin",
"JWT": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJTY29wZSI6IkFETUlOIiwiVXNlcklEIjoiMSIsIkxlZ2FsUmVwSUQiOiIiLCJDdXN0b21lcklEIjoiIiwiVXNlckVtYWlsIjoiYWRtaW5AbmV0c3lzLm9yZyIsIlRva2VuSUQiOiIiLCJVc2VyTmFtZSI6ImFkbWluIiwiQ3VzdG9tZXJOYW1lIjoiIiwiSnRpIjoiYmNhNTNiMjAxNmRlNDY1NWJhZThiMzgwNzZkMjQxOGIiLCJLZXkiOiIiLCJSb2xlcyI6W3sibmFtZSI6IlBMIiwicm9sZSI6IlJPTEVfU1VQRVJfQURNSU4ifSx7Im5hbWUiOiJQTCIsInJvbGUiOiJST0xFX0FETUlOIn1dLCJleHAiOjE2ODQ5MjE1NjMsImlzcyI6Imp3dC1hdXRoIiwic3ViIjoiVXNlciIsIlRva2VuRW5hYmxlZCI6ZmFsc2UsIlZlbmRvcklEIjoiIiwiQmFua05hbWUiOiIiLCJCYW5rSUQiOiIifQ.PB5QvKPPiBYalw6KcxkL3eEkl3XlxPBoxG0jQRCvJWc",
"expirationTime": 1684921563,
"qrToken": "Ledger:None",
"ip": "42.111.165.238",
"type": "ADMIN",
"lastLoginTime": "2023-05-24T08:12:41.494Z",
"lastLoginIp": "106.51.2.218",
"otpEnabled": false
},
"userRoles": "ROLE_SUPER_ADMIN,ROLE_ADMIN"
}