Authentication
Obtain the MQTT address, port, account password of the cabinet.
API Request
Request URL
POST
https://{host}/api/rentbox/client/connect?simUUID={simUUID}&simMobile={simMobile}&uuid={uuid}&deviceId={deviceId}&sign={sign}
text
/api/rentbox/client/connecttext
Content-Type:text/plainRequest Parameters
| Name | Identification code | Is it required | Remarks |
|---|---|---|---|
| Server domain name | host | YES | Provided by the customer, for example: s.abc.com |
| SIM card unique code | simUUID | NO | SIM card ICCID |
| SIM card mobile number | simMobile | NO | SIM card mobile number |
| Device globally unique code | uuid | YES | 4G communication module, IMEI number |
| Device ID | deviceId | YES | Reserved parameter, default 0 |
| Interface signature | sign | YES | MD5 encryption |
Body
Device current version number
text
hardware=V6086Interface signature
text
sign=MD5("deviceId={deviceId}|simMobile={simMobile}|simUUID={simUUID}|uuid={uuid}")API Example
text
Content-Type:text/plaintext
/api/rentbox/client/connectBody
hardware=V6086&software=20240904-RBMG-3.0.0.0
sign = ff46bf468563a48b068d198158a21835
MD5("deviceId=0|simMobile=|simUUID=89860427092281034392|uuid=860602069165357")
API Response
text
{
"code":200,
"type":0,
"data":"864601068367135,powerbank,212p044l42.zicp.fun,1883,864601068367135,e1fbe480cbb9fda953eb769a4200ea53,1705661910800",
"msg":"OK",
"time":1705661910697
}| Name | Identification code | Type | Remarks |
|---|---|---|---|
| status code | code | int | Default: 200 |
| status type | type | int | Default: 0 |
| Custom data | data | string | MQTT connection parameters, "," split array |
| Exception message | msg | string | Default: OK |
| timestamp | time | long | current millisecond timestamp |
MQTT connection parameters
| - | Name | Identification code | Type | Remarks |
|---|---|---|---|---|
| array[0] | unique identifier | clientId | string | For example: 864601068367135 |
| array[1] | product name | productKey | string | Default: powerbank |
| array[2] | connection address | host | string | For example: 212p044l42.zicp.fun |
| array[3] | port number | port | int | Default: 1883 |
| array[4] | username | userName | string | For example: 864601068367135 Suggest: 4G communication module, IMEI number |
| array[5] | Password | password | string | For example: e1fbe480cbb9fda953eb769a4200ea53 |
| array[6] | timestamp | time | long | For example: 1705661910800 |
