授权码
说明:主要对授权码进行一些基础操作,例如获取授权码、查询TPP支持等。
获取授权码
- 调用方法
javascript
POST /api/authCode/getActivateInfo- 参数说明
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| register_key | string | Y | "key123" | 授权池动态注册密钥 锁中获取 |
| platform | int | Y | 2 | 平台ID 通过【查询TPP支持】的API获取 |
| model | string | Y | "xxWIFI门锁" | 锁的型号 |
| serial_num0 | string | Y | "1234567890" | 锁的唯一ID |
- 返回说明
| 名称 | 类型 | 描述 |
|---|---|---|
| auth_code | string | 授权码 |
| activated_at | string | 激活时间 |
| extra_params | object | 额外参数 |
- 返回示例
json
{
"errorCode": 0,
"description": "",
"data": {
"auth_code": "",
"activated_at": "2025-08-06 10:00:00",
"extra_params": null
}
}查询TPP支持
- 调用方法
javascript
POST /api/authCode/getTppSupport- 参数说明
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| model | string | Y | "xxWIFI门锁" | 锁的型号 |
- 返回说明
| 名称 | 类型 | 描述 |
|---|---|---|
| platform | int | 平台ID |
| platform_name | string | 平台名称 |
- 返回示例
json
{
"errorCode": 0,
"description": "",
"data": [
{
"platform": 2,
"platform_name": "涂鸦平台"
}
]
}