java开发之个微机器人的实现
简要描述:
- 二次登录
请求URL:
http://域名地址/secondLogin
请求方式:
- POST
请求头Headers:
- Content-Type:application/json
- Authorization:login接口返回
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
wcId | 是 | string | 微信id(登录接口返回的wcId) |
ttuid | 是/否 | string | 若使用方式1取码登录,本参数则必传,反之则不传 |
返回数据:
参数名 | 类型 | 说明 |
---|---|---|
code | string | 1000成功,1001失败 |
msg | string | 反馈信息 |
data | ||
wId | string | 登录实例标识, 登录成功后wId会变更,记得更新 |
wcId | string | 微信id |
nickName | string | 昵称 |
headUrl | string | 头像url |
wAccount | string | 手机上显示的微信号 |
sex | int | 性别 |
status | string | 3 扫码登录成功 |
请求参数示例
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#f7f8f9"><span style="color:black"><code><span style="color:#999999">{</span>
<span style="color:#990055">"wcId"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"wxid_gia1nwcgpobz22"</span>
<span style="color:#999999">}</span></code></span></span></span></span>
成功返回示例
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#f7f8f9"><span style="color:black"><code><span style="color:#999999">{</span>
<span style="color:#990055">"message"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"成功"</span><span style="color:#999999">,</span>
<span style="color:#990055">"code"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"1000"</span><span style="color:#999999">,</span>
<span style="color:#990055">"data"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#999999">{</span>
<span style="color:#990055">"wcId"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"wxid_ylxtflcg0p8b22"</span><span style="color:#999999">,</span>
<span style="color:#990055">"wAccount"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"hirsi520"</span><span style="color:#999999">,</span>
<span style="color:#990055">"country"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"CN"</span><span style="color:#999999">,</span>
<span style="color:#990055">"wId"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"c7fcd475-3c86-4061-ba95-aaae52bf9620"</span><span style="color:#999999">,</span>
<span style="color:#990055">"city"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"Nanjing"</span><span style="color:#999999">,</span>
<span style="color:#990055">"signature"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"E云客服对接,api 系统,大家有问题可以找我咨询呀"</span><span style="color:#999999">,</span>
<span style="color:#990055">"nickName"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"售前客服-小诺 (工作日9:00-18:00)"</span><span style="color:#999999">,</span>
<span style="color:#990055">"sex"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#990055">2</span><span style="color:#999999">,</span>
<span style="color:#990055">"headUrl"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"http://wx.qlogo.cn/mmhead/ver_1/71icIciaZ1RvFpIJUGp6pCI6Uydndbib74FyUY6pPrEKO1F4cVTgfx5QjnoShlGZamsMicOYWccSqUicZ1LsKtQjtr5icyQiau5aAiaLafMPo9e1vQU/0"</span><span style="color:#999999">,</span>
<span style="color:#990055">"smallHeadImgUrl"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"http://wx.qlogo.cn/mmhead/ver_1/71icIciaZ1RvFpIJUGp6pCI6Uydndbib74FyUY6pPrEKO1F4cVTgfx5QjnoShlGZamsMicOYWccSqUicZ1LsKtQjtr5icyQiau5aAiaLafMPo9e1vQU/132"</span><span style="color:#999999">,</span>
<span style="color:#990055">"status"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#990055">3</span>
<span style="color:#999999">}</span>
<span style="color:#999999">}</span></code></span></span></span></span>
错误返回示例
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#f7f8f9"><span style="color:black"><code><span style="color:#999999">{</span>
<span style="color:#990055">"message"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"系统失败,请重试"</span><span style="color:#999999">,</span>
<span style="color:#990055">"code"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"1001"</span><span style="color:#999999">,</span>
<span style="color:#990055">"data"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#0077aa">null</span>
<span style="color:#999999">}</span>
<span style="color:#999999">{</span>
<span style="color:#990055">"message"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"成功"</span><span style="color:#999999">,</span>
<span style="color:#990055">"code"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"1000"</span><span style="color:#999999">,</span>
<span style="color:#990055">"data"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#999999">{</span>
<span style="color:#990055">"message"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"二次登录失败,请重新扫码登录"</span><span style="color:#999999">,</span>
<span style="color:#990055">"code"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"1001"</span><span style="color:#999999">,</span>
<span style="color:#990055">"data"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#0077aa">null</span>
<span style="color:#999999">}</span>
<span style="color:#999999">}</span></code></span></span></span></span>
测试地址:https://wkteam.cn/