欢迎回来,开发者
接入Mild White宠物物联网能力,快速构建智能宠物产品
快速开始
资质申请
请填写企业信息并提交审核,审核通过后即可获得开放平台调用权限
应用凭证
您的应用身份凭证,调用开放平台接口时使用,请妥善保管
资质审核中
您的资质申请正在审核中,预计1-3个工作日完成,审核通过后即可查看应用凭证。
应用信息
已开通xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
********************************
限流配置
如需调整限流配置,请联系技术支持修改
安全提示
AppSecret 是您的应用身份凭证,请妥善保管,不要泄露给他人或上传到公开代码仓库。如发现泄露,请立即重置密钥。
API 文档
开放平台接口说明与调用示例
快速开始
- 注册开发者账号并提交企业资质审核
- 审核通过后,在「应用凭证」页面获取 SDKAppID 和 AppSecret
- 调用
/oauth/token接口获取 access_token - 携带 access_token 调用各业务接口
接口列表
| 接口 | 说明 |
|---|---|
POST /oauth/token |
获取访问令牌 |
POST /open/api/allocateThirdUserCode |
分配第三方用户识别码 |
POST /open/api/bindDevice |
绑定设备 |
| MQTT 实时数据 | 订阅专属Topic接收设备实时体征数据 |
完整文档请查看:API文档完整版
SDK下载与集成
下载各端SDK,快速接入Mild White宠物物联网开放平台
接入流程图
Mild White 开放平台接入指南(中文版)
文档说明
本文档为Mild White宠物健康开放平台接入指南,包含HTTP接口调用、MQTT实时数据订阅、错误码说明、接入示例等内容,适用于第三方开发者接入平台获取宠物健康数据。
一、接入流程
- 注册开放平台开发者账号,完成邮箱验证
- 提交企业资质申请,等待审核
- 审核通过后,在「应用凭证」页面获取SDKAppID和AppSecret
- 调用OAuth2接口获取access_token
- 调用HTTP接口完成用户、设备绑定
- 连接MQTT订阅实时体征数据
二、接口鉴权(OAuth2)
所有HTTP接口调用前需要先获取access_token,access_token有效期为2小时,过期需要重新获取。
2.1 获取access_token
接口地址:POST https://open.aidbai.com/oauth/token
Content-Type:application/x-www-form-urlencoded
请求参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| grant_type | string | 是 | 固定值:client_credentials |
| sdk_app_id | string | 是 | 平台分配的SDKAppID |
| app_secret | string | 是 | 平台分配的AppSecret |
返回示例:
{
"code": 1,
"msg": "成功",
"data": {
"accessToken": "3f84e01c6f5947a08a1d91c0f3928887",
"expiresIn": 7200
}
}
调用示例:
curl -X POST https://open.aidbai.com/oauth/token \ -d "grant_type=client_credentials" \ -d "sdk_app_id=你的SDKAppID" \ -d "app_secret=你的AppSecret"
2.2 接口调用方式
所有业务接口请求需要在Header中携带Authorization:
Authorization: Bearer {access_token}
Content-Type: application/json
三、HTTP接口列表
3.1 分配第三方用户标识
第三方用户在你的平台注册后,调用此接口获取平台唯一用户标识ThirdUserCode,用于后续设备绑定和数据关联。
接口地址:POST https://open.aidbai.com/open/api/allocateThirdUserCode
请求参数:无
返回示例:
{
"code": 1,
"msg": "成功",
"data": {
"third_user_code": "a1b2c3d4e5f6g7h8"
}
}
3.2 绑定设备
将设备SN与第三方用户、宠物ID绑定,绑定后该设备的实时数据会推送到你的MQTT主题。
接口地址:POST https://open.aidbai.com/open/api/bindDevice
请求参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| device_sn | string | 是 | 设备SN序列号 |
| third_user_code | string | 是 | 平台分配的第三方用户标识 |
| pet_id | long | 否 | 第三方系统内的宠物ID |
请求示例:
{
"device_sn": "SN202607230001",
"third_user_code": "a1b2c3d4e5f6g7h8",
"pet_id": 10086
}
返回示例:
{
"code": 1,
"msg": "成功"
}
3.3 解绑设备
解绑已绑定的设备,解绑后不再推送该设备数据。
接口地址:POST https://open.aidbai.com/open/api/unbindDevice
请求参数:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| device_sn | string | 是 | 设备SN序列号 |
请求示例:
{
"device_sn": "SN202607230001"
}
返回示例:
{
"code": 1,
"msg": "成功"
}
3.4 查询设备归属
查询设备当前绑定的机构、用户信息。
接口地址:GET https://open.aidbai.com/open/api/getDeviceOwner?device_sn=xxx
返回示例:
{
"code": 1,
"msg": "成功",
"data": {
"sdk_app_id": "562d82168a3117df832ec305118fc5ca",
"device_sn": "SN202607230001",
"third_user_code": "a1b2c3d4e5f6g7h8",
"pet_id": 10086
}
}
四、MQTT实时数据接入
4.1 接入信息
| 项 | 值 | 说明 |
|---|---|---|
| Broker地址 | mqtt.aidbai.com | 公网访问地址 |
| TCP端口 | 1883 | 标准MQTT端口,无加密 |
| MQTTS端口 | 8883 | SSL加密端口(可选) |
| 用户名 | {你的SDKAppID} | 平台分配的应用ID |
| 密码 | {你的AppSecret} | 平台分配的应用密钥 |
| 订阅Topic | open/app/{SDKAppID}/realtime | 仅可订阅自己SDKAppID的主题 |
| QoS等级 | 1 | 推荐使用QoS1保证消息至少到达一次 |
| 消息格式 | JSON(UTF-8编码) | 所有消息统一JSON格式 |
| 时间标准 | 东八区(北京时间/UTC+8) | 所有时间戳均为中国时区时间 |
4.2 订阅规则
- 权限隔离:每个机构只能订阅
open/app/{你的SDKAppID}/realtime主题,系统自动禁止跨机构订阅 - 禁止通配符:不允许使用
#、+等通配符订阅,会被直接拒绝连接 - 禁止发布:第三方客户端仅允许订阅消息,不允许向任何主题发布消息
- 连接数限制:每个SDKAppID默认最多支持10个长连接,需要更多连接可联系客服调整
- 离线消息:连接时设置Clean Session为false,离线期间的消息会在重连后推送
4.3 消息体字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| third_user_code | string | 第三方用户唯一标识,通过allocateThirdUserCode接口分配 |
| pet_id | long | 宠物ID,第三方系统内的宠物唯一标识 |
| device_sn | string | 设备SN序列号 |
| heart_rate | int | 心率,单位:次/分钟,正常范围0-250 |
| breath_rate | int | 呼吸频率,单位:次/分钟,正常范围0-60 |
| in_bed | boolean | 是否在垫上:true=在垫上,false=离垫 |
| activity | int | 活动指数,范围0-100,数值越大活动越剧烈 |
| heart_rate_probability | int | 心率数据置信度,范围0-100,低于60建议过滤本次心率值 |
| breath_rate_probability | int | 呼吸数据置信度,范围0-100,低于60建议过滤本次呼吸值 |
| timestamp | long | 数据采集时间戳,13位毫秒级Unix时间戳(北京时间) |
4.4 消息示例
4.4.1 常规周期上报示例(在垫状态,每10秒推送一次)
{
"third_user_code": "a1b2c3d4e5f6g7h8",
"pet_id": "10086",
"device_sn": "SN202607230001",
"heart_rate": 86,
"breath_rate": 22,
"in_bed": true,
"activity": 12,
"heart_rate_probability": 92,
"breath_rate_probability": 88,
"timestamp": 1753274400000
}
对应北京时间:2026-07-23 20:40:00
4.4.2 离垫状态示例(无有效心率呼吸数据)
{
"third_user_code": "a1b2c3d4e5f6g7h8",
"pet_id": "10086",
"device_sn": "SN202607230001",
"heart_rate": 0,
"breath_rate": 0,
"in_bed": false,
"activity": 0,
"heart_rate_probability": 0,
"breath_rate_probability": 0,
"timestamp": 1753274460000
}
4.5 订阅示例
4.5.1 Java 示例(Eclipse Paho)
import org.eclipse.paho.client.mqttv3.*;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
public class MqttSubscribeExample {
public static void main(String[] args) {
String broker = "tcp://mqtt.aidbai.com:1883";
String sdkAppId = "你的SDKAppID";
String appSecret = "你的AppSecret";
String topic = "open/app/" + sdkAppId + "/realtime";
String clientId = "server_" + sdkAppId + "_" + System.currentTimeMillis();
try {
MqttClient client = new MqttClient(broker, clientId, new MemoryPersistence());
MqttConnectOptions options = new MqttConnectOptions();
options.setUserName(sdkAppId);
options.setPassword(appSecret.toCharArray());
options.setCleanSession(false);
options.setConnectionTimeout(10);
options.setKeepAliveInterval(30);
options.setAutomaticReconnect(true);
client.setCallback(new MqttCallback() {
@Override
public void connectionLost(Throwable cause) {
System.out.println("连接断开,自动重连: " + cause.getMessage());
}
@Override
public void messageArrived(String topic, MqttMessage message) {
String payload = new String(message.getPayload());
System.out.println("收到消息: " + payload);
}
@Override
public void deliveryComplete(IMqttDeliveryToken token) {}
});
client.connect(options);
client.subscribe(topic, 1);
} catch (MqttException e) {
e.printStackTrace();
}
}
}
4.5.2 PHP 示例(php-mqtt/client)
<?php
require __DIR__ . '/vendor/autoload.php';
use PhpMqtt\Client\MqttClient;
use PhpMqtt\Client\ConnectionSettings;
$server = 'mqtt.aidbai.com';
$port = 1883;
$sdkAppId = '你的SDKAppID';
$appSecret = '你的AppSecret';
$topic = "open/app/{$sdkAppId}/realtime";
$clientId = 'php_server_' . uniqid();
$connectionSettings = (new ConnectionSettings())
->setUsername($sdkAppId)
->setPassword($appSecret)
->setKeepAliveInterval(30)
->setConnectTimeout(10)
->setReconnectAutomatically(true);
$mqtt = new MqttClient($server, $port, $clientId);
$mqtt->connect($connectionSettings, true);
$mqtt->subscribe($topic, function (string $topic, string $message) {
echo "收到消息: {$message}\n";
}, 1);
$mqtt->loop(true);
4.5.3 Python 示例(paho-mqtt)
import paho.mqtt.client as mqtt
import json
BROKER = "mqtt.aidbai.com"
PORT = 1883
SDK_APP_ID = "你的SDKAppID"
APP_SECRET = "你的AppSecret"
TOPIC = f"open/app/{SDK_APP_ID}/realtime"
def on_connect(client, userdata, flags, rc):
print(f"连接成功,结果码: {rc}")
client.subscribe(TOPIC, qos=1)
def on_message(client, userdata, msg):
payload = json.loads(msg.payload.decode('utf-8'))
print(f"收到消息: {payload}")
client = mqtt.Client(client_id=f"python_server_{SDK_APP_ID}", clean_session=False)
client.username_pw_set(SDK_APP_ID, APP_SECRET)
client.on_connect = on_connect
client.on_message = on_message
client.connect(BROKER, PORT, 60)
client.loop_forever()
五、错误码说明
| 错误码 | 说明 |
|---|---|
| 1 | 请求成功 |
| 401 | 未授权/未登录/access_token无效或过期/缺少认证请求头 |
| 40000 | 请求方法不支持 |
| 40001 | SDKAppID不存在或AppSecret错误 |
| 40002 | 应用已被禁用 |
| 40003 | 参数错误(缺少必填参数、格式错误、类型错误、JSON解析失败) |
| 40004 | 邮箱已注册 |
| 40005 | 密码长度不足6位 |
| 40006 | 验证码错误或已过期 |
| 40007 | 邮箱或密码错误 |
| 40008 | 门户账号已被禁用 |
| 40010 | 设备已被其他账号绑定 |
| 40011 | 资质申请已通过,无需重复提交 |
| 40012 | 设备未绑定 |
| 40013 | 无权操作该设备/设备不属于当前应用 |
| 40014 | 设备不存在,请确认设备SN正确 |
| 42901 | 请求过于频繁,请稍后重试 |
| 50000 | 操作失败/服务内部异常 |
六、常见问题
6.1 HTTP接口调用返回401
- 检查access_token是否正确,是否过期
- 检查Authorization头格式是否为
Bearer {access_token} - 检查接口是否携带正确的Content-Type: application/json
6.2 MQTT连接失败提示"Not authorized"
- 检查SDKAppID和AppSecret是否正确,注意前后不要有空格
- 检查应用状态是否正常,是否被禁用
- 检查是否超过最大连接数限制
6.3 MQTT订阅失败
- 检查订阅的Topic是否正确,必须为
open/app/{你的SDKAppID}/realtime - 确认没有使用通配符
#或+ - 确认Topic中的SDKAppID和连接用户名一致
6.4 收不到MQTT消息
- 检查设备是否已经绑定到你的应用下
- 检查设备是否在线、是否在垫上
- 确认QoS设置为1,Clean Session设置为false
- 检查网络是否开放1883端口,云服务器安全组是否放开端口
6.5 时间戳解析错误
- 所有时间戳为东八区(北京时间)13位毫秒时间戳,解析时按UTC+8时区转换
七、技术支持
如有接入问题,请联系技术支持:mw@aidbai.com
Mild White Open Platform Integration Guide (English Version)
Document Description
This document is the integration guide for Mild White Pet Health Open Platform, including HTTP API calls, MQTT real-time data subscription, error code descriptions, and integration examples, suitable for third-party developers to access the platform to obtain pet health data.
1. Integration Process
- Register an open platform developer account and complete email verification
- Submit enterprise qualification application and wait for review
- After approval, obtain SDKAppID and AppSecret on the "Application Credentials" page
- Call OAuth2 interface to get access_token
- Call HTTP interfaces to complete user and device binding
- Connect to MQTT to subscribe to real-time vital sign data
2. API Authentication (OAuth2)
Before calling all HTTP APIs, you need to obtain an access_token first. The access_token is valid for 2 hours and needs to be re-obtained after expiration.
2.1 Get access_token
API Endpoint: POST https://open.aidbai.com/oauth/token
Content-Type: application/x-www-form-urlencoded
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| grant_type | string | Yes | Fixed value: client_credentials |
| sdk_app_id | string | Yes | SDKAppID assigned by the platform |
| app_secret | string | Yes | AppSecret assigned by the platform |
Response Example:
{
"code": 1,
"msg": "success",
"data": {
"accessToken": "3f84e01c6f5947a08a1d91c0f3928887",
"expiresIn": 7200
}
}
Call Example:
curl -X POST https://open.aidbai.com/oauth/token \ -d "grant_type=client_credentials" \ -d "sdk_app_id=YOUR_SDK_APP_ID" \ -d "app_secret=YOUR_APP_SECRET"
2.2 API Call Method
All business API requests need to carry Authorization in the Header:
Authorization: Bearer {access_token}
Content-Type: application/json
3. HTTP API List
3.1 Allocate Third-party User Code
After a third-party user registers on your platform, call this interface to obtain the platform's unique user identifier ThirdUserCode, which is used for subsequent device binding and data association.
API Endpoint: POST https://open.aidbai.com/open/api/allocateThirdUserCode
Request Parameters: None
Response Example:
{
"code": 1,
"msg": "success",
"data": {
"third_user_code": "a1b2c3d4e5f6g7h8"
}
}
3.2 Bind Device
Bind the device SN with the third-party user and pet ID. After binding, real-time data of the device will be pushed to your MQTT topic.
API Endpoint: POST https://open.aidbai.com/open/api/bindDevice
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| device_sn | string | Yes | Device SN serial number |
| third_user_code | string | Yes | Third-party user identifier assigned by the platform |
| pet_id | long | No | Pet ID in the third-party system |
Request Example:
{
"device_sn": "SN202607230001",
"third_user_code": "a1b2c3d4e5f6g7h8",
"pet_id": 10086
}
Response Example:
{
"code": 1,
"msg": "success"
}
3.3 Unbind Device
Unbind a bound device, after which data for that device will no longer be pushed.
API Endpoint: POST https://open.aidbai.com/open/api/unbindDevice
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| device_sn | string | Yes | Device SN serial number |
Request Example:
{
"device_sn": "SN202607230001"
}
Response Example:
{
"code": 1,
"msg": "success"
}
3.4 Query Device Ownership
Query the organization and user information currently bound to the device.
API Endpoint: GET https://open.aidbai.com/open/api/getDeviceOwner?device_sn=xxx
Response Example:
{
"code": 1,
"msg": "success",
"data": {
"sdk_app_id": "562d82168a3117df832ec305118fc5ca",
"device_sn": "SN202607230001",
"third_user_code": "a1b2c3d4e5f6g7h8",
"pet_id": 10086
}
}
4. MQTT Real-time Data Access
4.1 Access Information
| Item | Value | Description |
|---|---|---|
| Broker Address | mqtt.aidbai.com | Public network access address |
| TCP Port | 1883 | Standard MQTT port, unencrypted |
| MQTTS Port | 8883 | SSL encrypted port (optional) |
| Username | {YOUR_SDK_APP_ID} | Application ID assigned by the platform |
| Password | {YOUR_APP_SECRET} | Application secret assigned by the platform |
| Subscribe Topic | open/app/{SDKAppID}/realtime | You can only subscribe to topics with your own SDKAppID |
| QoS Level | 1 | QoS1 is recommended to ensure messages arrive at least once |
| Message Format | JSON (UTF-8 encoding) | All messages are in unified JSON format |
| Time Standard | UTC+8 (Beijing Time) | All timestamps are in China time zone |
4.2 Subscription Rules
- Permission Isolation: Each organization can only subscribe to the
open/app/{your SDKAppID}/realtimetopic, cross-organization subscriptions are automatically prohibited by the system - Wildcards Prohibited: Subscriptions using wildcards such as
#and+are not allowed and will be directly rejected - Publishing Prohibited: Third-party clients are only allowed to subscribe to messages, and are not allowed to publish messages to any topic
- Connection Limit: Each SDKAppID supports up to 10 long connections by default, contact customer service for more connections
- Offline Messages: Set Clean Session to false when connecting, messages during offline period will be pushed after reconnection
4.3 Message Body Field Description
| Field | Type | Description |
|---|---|---|
| third_user_code | string | Third-party user unique identifier, allocated through the allocateThirdUserCode interface |
| pet_id | long | Pet ID, the unique identifier of the pet in the third-party system |
| device_sn | string | Device SN serial number |
| heart_rate | int | Heart rate, unit: beats per minute, normal range 0-250 |
| breath_rate | int | Respiratory rate, unit: breaths per minute, normal range 0-60 |
| in_bed | boolean | Whether on the pad: true=on pad, false=off pad |
| activity | int | Activity index, range 0-100, higher value means more intense activity |
| heart_rate_probability | int | Heart rate data confidence, range 0-100, it is recommended to filter heart rate values below 60 |
| breath_rate_probability | int | Breath rate data confidence, range 0-100, it is recommended to filter breath rate values below 60 |
| timestamp | long | Data collection timestamp, 13-bit millisecond Unix timestamp (Beijing time) |
4.4 Message Examples
4.4.1 Regular Periodic Report Example (on pad status, pushed every 10 seconds)
{
"third_user_code": "a1b2c3d4e5f6g7h8",
"pet_id": "10086",
"device_sn": "SN202607230001",
"heart_rate": 86,
"breath_rate": 22,
"in_bed": true,
"activity": 12,
"heart_rate_probability": 92,
"breath_rate_probability": 88,
"timestamp": 1753274400000
}
Corresponding Beijing time: 2026-07-23 20:40:00
4.4.2 Off-pad Status Example (no valid heart rate/breath data)
{
"third_user_code": "a1b2c3d4e5f6g7h8",
"pet_id": "10086",
"device_sn": "SN202607230001",
"heart_rate": 0,
"breath_rate": 0,
"in_bed": false,
"activity": 0,
"heart_rate_probability": 0,
"breath_rate_probability": 0,
"timestamp": 1753274460000
}
4.5 Subscription Examples
4.5.1 Java Example (Eclipse Paho)
import org.eclipse.paho.client.mqttv3.*;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
public class MqttSubscribeExample {
public static void main(String[] args) {
String broker = "tcp://mqtt.aidbai.com:1883";
String sdkAppId = "YOUR_SDK_APP_ID";
String appSecret = "YOUR_APP_SECRET";
String topic = "open/app/" + sdkAppId + "/realtime";
String clientId = "server_" + sdkAppId + "_" + System.currentTimeMillis();
try {
MqttClient client = new MqttClient(broker, clientId, new MemoryPersistence());
MqttConnectOptions options = new MqttConnectOptions();
options.setUserName(sdkAppId);
options.setPassword(appSecret.toCharArray());
options.setCleanSession(false);
options.setConnectionTimeout(10);
options.setKeepAliveInterval(30);
options.setAutomaticReconnect(true);
client.setCallback(new MqttCallback() {
@Override
public void connectionLost(Throwable cause) {
System.out.println("Connection lost, auto reconnecting: " + cause.getMessage());
}
@Override
public void messageArrived(String topic, MqttMessage message) {
String payload = new String(message.getPayload());
System.out.println("Message received: " + payload);
}
@Override
public void deliveryComplete(IMqttDeliveryToken token) {}
});
client.connect(options);
client.subscribe(topic, 1);
} catch (MqttException e) {
e.printStackTrace();
}
}
}
4.5.2 PHP Example (php-mqtt/client)
<?php
require __DIR__ . '/vendor/autoload.php';
use PhpMqtt\Client\MqttClient;
use PhpMqtt\Client\ConnectionSettings;
$server = 'mqtt.aidbai.com';
$port = 1883;
$sdkAppId = 'YOUR_SDK_APP_ID';
$appSecret = 'YOUR_APP_SECRET';
$topic = "open/app/{$sdkAppId}/realtime";
$clientId = 'php_server_' . uniqid();
$connectionSettings = (new ConnectionSettings())
->setUsername($sdkAppId)
->setPassword($appSecret)
->setKeepAliveInterval(30)
->setConnectTimeout(10)
->setReconnectAutomatically(true);
$mqtt = new MqttClient($server, $port, $clientId);
$mqtt->connect($connectionSettings, true);
$mqtt->subscribe($topic, function (string $topic, string $message) {
echo "Message received: {$message}\n";
}, 1);
$mqtt->loop(true);
4.5.3 Python Example (paho-mqtt)
import paho.mqtt.client as mqtt
import json
BROKER = "mqtt.aidbai.com"
PORT = 1883
SDK_APP_ID = "YOUR_SDK_APP_ID"
APP_SECRET = "YOUR_APP_SECRET"
TOPIC = f"open/app/{SDK_APP_ID}/realtime"
def on_connect(client, userdata, flags, rc):
print(f"Connected successfully, result code: {rc}")
client.subscribe(TOPIC, qos=1)
def on_message(client, userdata, msg):
payload = json.loads(msg.payload.decode('utf-8'))
print(f"Message received: {payload}")
client = mqtt.Client(client_id=f"python_server_{SDK_APP_ID}", clean_session=False)
client.username_pw_set(SDK_APP_ID, APP_SECRET)
client.on_connect = on_connect
client.on_message = on_message
client.connect(BROKER, PORT, 60)
client.loop_forever()
5. Error Code Description
| Error Code | Description |
|---|---|
| 1 | Request successful |
| 401 | Unauthorized/Not logged in/access_token invalid or expired/Missing authentication header |
| 40000 | Request method not supported |
| 40001 | SDKAppID not exist or AppSecret mismatch |
| 40002 | Application has been disabled |
| 40003 | Parameter error (missing required parameter, format error, type mismatch, JSON parse failed) |
| 40004 | Email already registered |
| 40005 | Password length must be at least 6 characters |
| 40006 | Verification code error or expired |
| 40007 | Email or password incorrect |
| 40008 | Portal account has been disabled |
| 40010 | Device has been bound by another account |
| 40011 | Qualification application already approved, no need to resubmit |
| 40012 | Device not bound |
| 40013 | No permission to operate this device/Device does not belong to current application |
| 40014 | Device not exist, please check device SN |
| 42901 | Too many requests, please try again later |
| 50000 | Operation failed/Internal server error |
6. FAQ
6.1 HTTP API call returns 401
- Check if the access_token is correct and not expired
- Check if the Authorization header format is
Bearer {access_token} - Check if the interface carries the correct Content-Type: application/json
6.2 MQTT connection fails with "Not authorized"
- Check if SDKAppID and AppSecret are correct, make sure there are no spaces before or after
- Check if the application status is normal and not disabled
- Check if the maximum number of connections is exceeded
6.3 MQTT subscription fails
- Check if the subscribed Topic is correct, it must be
open/app/{your SDKAppID}/realtime - Make sure no wildcards
#or+are used - Make sure the SDKAppID in the Topic matches the connection username
6.4 Not receiving MQTT messages
- Check if the device is bound to your application
- Check if the device is online and on the pad
- Make sure QoS is set to 1 and Clean Session is set to false
- Check if port 1883 is open on the network, and if the cloud server security group allows the port
6.5 Timestamp parsing error
- All timestamps are 13-bit millisecond timestamps in UTC+8 (Beijing Time), convert according to UTC+8 time zone when parsing
7. Technical Support
If you have integration questions, please contact technical support: mw@aidbai.com
SDK下载
用量统计
查看API调用和MQTT消息使用情况