简要描述:
- 获取联系人信息
请求URL:
http://域名地址/getContact
请求方式:
- POST
请求头Headers:
- Content-Type:application/json
- Authorization:login接口返回
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
wId | 是 | String | 登录实例标识 |
wcId | 是 | String | 好友微信id/群id,多个好友/群 以","分隔每次最多支持20个微信/群号,记得本接口随机间隔300ms-1500ms,频繁调用容易导致掉线 |
请求参数示例
<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">"wId"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"349be9b5-8734-45ce-811d-4e10ca568c67"</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">"LoChaX,wxid_wl9qchkanp9u22"</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:#999999">{</span>
<span style="color:#990055">"userName"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"test558666"</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">"追风少年666"</span><span style="color:#999999">,</span>
<span style="color:#990055">"remark"</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">"signature"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"66666"</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">1</span><span style="color:#999999">,</span>
<span style="color:#990055">"aliasName"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"test558666"</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">"bigHead"</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/PiajxSqBRaEL8iaRQBnStn37LYat3fREC4Y2iaStECzbX3icxntWBhWQ3w/0"</span><span style="color:#999999">,</span>
<span style="color:#990055">"smallHead"</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/PiajxSqBRaEL8iaRQBnStn37LYat3fREC4Y2iaStECzbX3icxntWBhWQ3w/132"</span><span style="color:#999999">,</span>
<span style="color:#990055">"labelList"</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">"v1"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"v1_584e7774024c79af0e7304bf7afba775b31bf075651c16c964b1b5bf16369924ebf1ee7bc151c1feee1979e1dd40f0dd@stranger"</span>
<span style="color:#999999">}</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></code></span></span></span></span>
返回数据:
参数名 | 类型 | 说明 |
---|---|---|
code | String | 1000成功 1001失败 |
msg | String | 反馈信息 |
data | JSONObject | |
userName | String | 微信id |
nickName | String | 昵称 |
remark | String | 备注 |
signature | String | 签名 |
sex | int | 性别 |
aliasName | String | 微信号 |
country | String | 国家 |
bigHead | String | 大头像 |
smallHead | String | 小头像 |
labelList | String | 标签列表 |
v1 | String | 用户的wxId,都是以v1开头的一串数值,v2数据,则是作为v1数据的辅助 |
测试地址:https://wkteam.cn/