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
Request URL: /api/rentbox/client/connect
Content-Type: text/plain
sign = MD5("deviceId={deviceId}|simMobile={simMobile}|simUUID={simUUID}|uuid={uuid}")

Body

text
hardware=20240904-RBMG-3.0.0.0&software=20240904-RBMG-3.0.0.0

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

名称标识代码类型备注
hardwarehardwarestring-
softwaresoftwarestring-

API Example

POST

https://s.abc.com/api/rentbox/client/connect?simUUID=89860427092281034392&simMobile=&uuid=860602069165357&deviceId=0&sign=ff46bf468563a48b068d198158a21835

text
Request URL: /api/rentbox/client/connect
Content-Type: text/plain
sign = MD5("deviceId=0|simMobile=|simUUID=89860427092281034392|uuid=860602069165357")   
     = ff46bf468563a48b068d198158a21835

body

text
hardware=V6086&software=20240904-RBMG-3.0.0.0

API Response

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
text
{
    "code":200,
    "type":0,
    "data":"864601068367135,powerbank,212p044l42.zicp.fun,1883,864601068367135,e1fbe480cbb9fda953eb769a4200ea53,1705661910800",
    "msg":"OK",
    "time":1705661910697
}