UserHub 用户管理系统 · 开发者对接指南
用户注册,支持用户名+邮箱+密码注册
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| action | string | ✅ 必填 | 固定值:register |
| username | string | ✅ 必填 | 用户名,3-20位 |
| string | ✅ 必填 | 邮箱地址 | |
| password | string | ✅ 必填 | 密码,至少6位 |
| nickname | string | ⭕ 选填 | 昵称,不填默认用用户名 |
用户登录,支持用户名或邮箱登录
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| action | string | ✅ 必填 | 固定值:login |
| account | string | ✅ 必填 | 用户名或邮箱 |
| password | string | ✅ 必填 | 密码 |
获取远程公告(扩展功能,后续可加)
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| action | string | ✅ 必填 | 固定值:announcement |
获取当前登录用户的详细信息
更新当前登录用户的个人信息
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| action | string | ✅ 必填 | 固定值:update_profile |
| nickname | string | ⭕ 选填 | 昵称 |
| gender | int | ⭕ 选填 | 0未知 1男 2女 |
| birthday | string | ⭕ 选填 | YYYY-MM-DD |
| signature | string | ⭕ 选填 | 个性签名 |
修改当前登录用户的密码
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| action | string | ✅ 必填 | 固定值:change_password |
| old_password | string | ✅ 必填 | 原密码 |
| new_password | string | ✅ 必填 | 新密码,至少6位 |
退出登录(客户端清除 Token 即可)
验证当前 Token 是否有效