Login Interface
For third-party platform integration, the first API interface to be implemented is the user login interface, through which the correct Token value is returned;
Login API Example
Request interface example, 192.168.1.108 is the IP address of the computer where the GVP server is located. Please adjust according to the actual situation
http://192.168.1.108:8008/api/?HDLRequest=UserLogin
Request method: POST
Interface address: /api/?HDLRequest=UserLogin
Request data type: application/json
Response data type: application/json
Interface Description: User login interface, upon successful login, returns user information, including the Token value
Headers parameter, none
| Key | Value | Description |
|---|---|---|
| Authorization | null | User login interface, no Headers parameter required, can be null |
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| UserName | String | true | Login username |
| UserPassword | String | true | Login password |
Request example, but the string must be encrypted using an encryption method before submission
{
"UserName": "",
"UserPassword": ""
}
Response parameters:
| Field | Type | Description |
|---|---|---|
| ReplyCode | String | Response code |
| ReplyMessage | String | Response message prompt |
| ReplyDataType | Integer | Response data type, can be ignored |
| ReplyObject | Array | Response data. For detailed information, refer to the example description |
Response example:
{
"ReplyCode": "Success",
"ReplyMessage": "Success",
"ReplyDataType": 0,
"ReplyObject": {
"Authorization": "",// Token value
"UserGuid": "", // Unique GUID of the user
"UserRole": 1 // User role: 0 - Operator, 1 - Temporary Administrator, 2 - Super Administrator, 3 - Browser
},
"TotalRowCount": 0, // Can be ignored, representing the total number of rows in the paged query
"AlarmCount": 0,// can be ignored
"PageCount": 0 // can be ignored, representing the total number of pages in a paged query
}