Set App login mode
1. API Description
This API is used to set the login mode of the App.
Request mode:
- V2.6.0 and above: POST [ip]/mwapi/V2.0/app/set-app-password
- V2.5.0 and below: POST [ip]/mwapi/set-app-password
Administrator Rights | Logged-in |
---|---|
No | Yes |
2. Input Parameters
Name | Required | Type | Description |
---|---|---|---|
pairingMode | Yes | Int | Login mode 0: Free login; 1: Password to login; 2: Pairing to login |
new-password | No | String | New password, Base64 ciphertext, required when set to "Password to login" |
3. Output Parameters
Name | Type | Description |
---|---|---|
status | Int | Status code |
message | String | Status description |
4. Example
Setting the login mode to "Password to login".
Input Example
{
"pairingMode":1,
"new-password":"8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92"
}
Output Example
{
"message": "success",
"status": 0
}
5. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Status | Definition | Description |
---|---|---|
11 | MW_STATUS_DEVICE_BUSY | It is not allowed in the "Pairing to login" mode |
49 | MW_STATUS_INVALID_DATA | The parameters are missing or incorrect |