Skip to content

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/connect
text
Content-Type:text/plain

Request Parameters

NameIdentification codeIs it requiredRemarks
Server domain namehostYESProvided by the customer, for example: s.abc.com
SIM card unique codesimUUIDNOSIM card ICCID
SIM card mobile numbersimMobileNOSIM card mobile number
Device globally unique codeuuidYES4G communication module, IMEI number
Device IDdeviceIdYESReserved parameter, default 0
Interface signaturesignYESMD5 encryption

Body

Device current version number

text
hardware=V6086

Interface signature

text
sign=MD5("deviceId={deviceId}|simMobile={simMobile}|simUUID={simUUID}|uuid={uuid}")

API Example

text
Content-Type:text/plain
text
/api/rentbox/client/connect

Body

hardware=V6086&software=20240904-RBMG-3.0.0.0

sign = ff46bf468563a48b068d198158a21835

MD5("deviceId=0|simMobile=|simUUID=89860427092281034392|uuid=860602069165357")

API Response

json
{
    "code":200,
    "type":0,
    "data":"864601068367135,powerbank,212p044l42.zicp.fun,1883,864601068367135,e1fbe480cbb9fda953eb769a4200ea53,1705661910800",
    "msg":"OK",
    "time":1705661910697
}
NameIdentification codeTypeRemarks
status codecodeintDefault: 200
status typetypeintDefault: 0
Custom datadatastringMQTT connection parameters, "," split array
Exception messagemsgstringDefault: OK
timestamptimelongcurrent millisecond timestamp

MQTT connection parameters

-NameIdentification codeTypeRemarks
array[0]unique identifierclientIdstringFor example: 864601068367135
array[1]product nameproductKeystringDefault: powerbank
array[2]connection addresshoststringFor example: 212p044l42.zicp.fun
array[3]port numberportintDefault: 1883
array[4]usernameuserNamestringFor example: 864601068367135
Suggest: 4G communication module, IMEI number
array[5]PasswordpasswordstringFor example: e1fbe480cbb9fda953eb769a4200ea53
array[6]timestamptimelongFor example: 1705661910800