保存设备信息
请求URL:
/saveDevice
请求方式:
- POST
请求头
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| Authorization | 否 | string | 登录成功后的通讯令牌 |
参数:
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| appId | 是 | string | App唯一标识 |
| udid | 是 | string | 唯一设备ID |
| vpn | 否 | bool | 客户端是否开启了vpn |
| deviceName | 否 | string | 设备名称 |
| systemName | 否 | string | 系统名称 |
| systemVersion | 否 | string | 系统版本 |
| language | 否 | string | 当前使用的语言 |
| timezone | 否 | string | 时区 |
| appVersion | 否 | string | 应用版本 |
返回示例
{
"code": 200,
"msg": "SUCCESS",
"data": {
"accessToken": "36b8fcf01558cbea6acde07aae67a2f9",
"appUpdate": {
"content": "fix bugs...",
"force": false,
"link": "https://apps.apple.com/us/app/ai-pic-master-anime-art/id6745702417",
"version": "1.2.1"
},
"contactUs": "https://discord.gg/hHCqMp8Bg4",
"control": {
"isCheck": true
},
"isNewDevice": true,
"role": 7,
"subscribeExpired": 0,
"subscribeState": 0,
"payBalance": 0,
"freeBalance": 100,
"purchaseVideoUrl": "https://muyuhan.s3.amazonaws.com/facewap/video/purchase_e.mp4",
"userId": "A10000000"
"subscribePlan": "com.picx.sub.weekly"
"nextRefreshTime": -1
}
}
返回参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | int | 状态码 |
| msg | string | |
| data | struct | |
| -accessToken | string | 登录成功后的通讯令牌 |
| -userId | string | 用户ID |
| -isNewDevice | bool | 是否新设备 |
| -subscribeExpired | int64 | 订阅过期时间 |
| -subscribeState | int | 订阅状态:0-未订阅;2000-正常;2010-已取消;2020-已过期 |
| -contactUs | string | 联系我们 |
| -subscribePlan | string | 当前订阅产品ID |
| -nextRefreshTime | int64 | 下次刷新时间(-1表示不再刷新) |
| -appUpdate | struct | 更新内容 |
| --force | bool | 否强制用户更新 |
| --link | string | 更新需要跳转的地址 |
| --version | string | 更新的版本 |
| --content | string | 更新的内容 |
| --purchaseVideoUrl | string | 内购视频地址 |
| --payBalance | int | 付费账号余额 |
| --freeBalance | int | 免费账号余额 |
备注
错误码 510 系统错误 800 参数错误