##### Brief description - Device registration interface, used to obtain information such as MQTT server address, username, password, etc. ##### Request URL Demo address - `http://demo.esltag.cc/openapi/mqttregister` ##### Request method - POST ##### Request Message Example ```http POST http://demo.esltag.cc/openapi/mqttregister HTTP/1.1 Host: demo.esltag.cc Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 ``` ##### Request Body Parameters | Parameter name | Required | Type | Example | Description | | --- | --- | --- | --- | --- | | `appid` | Yes | string | `d114c07a-24ed-41b2-9cc3-58ae5bb9ace1_2303065600000005` | Account AppID | | `sn` | Yes | string | 2C0547E35BA5 | Price Tag serial number | | `ts` | Yes | long | 1679539549647 | Current timestamp is at 13 bits | | `sign` | Yes | string | F26289DD0F88E121D0180B5D9C85980B | The signature value is calculated by the signature algorithm | ##### Response Message Example ```http HTTP/1.1 200 OK Content-Length: 121 Content-Type: application/json; charset=utf-8 ``` ##### Return an example ```json { "State": "Done", "Message": "注册成功", "Number": "", "Data": { "mqtthost": "demo.esltag.cc", "mqttport": "1883", "username": "Signature|LTAI5tKZJbbwHxE********|**********", "password": "TAw321G60ExFcNCngsWY********", "client_id": "GID_test@@@2C0547C36***", "topic": "test/p2p/GID_test@@@2C0547C36***" }, "Level": 0, "ErrorColumn": null } ``` ##### Return parameter description ###### Public parameters | Parameter name | Type | Explain | | --- | --- | --- | | `State` | string | Return to the status code, Done / Fail | | `Message` | string | Return information | | `Number` | string | Error code | | `Data` | string | json | ###### Data Parameter | Parameter name | Type | Explain | | --- | --- | --- | | `mqtthost` | string | Mqtt Server Address | | `mqttport` | string | Mqtt Server Port | | `username` | string | User Name | | `password` | string | Password | | `client_id` | string | Mqtt client id | | `topic` | string | Topic | ##### Remarks - The return error code is not defined in this article, but can be defined as needed