协作系统-查询微信用户信息接口
<h2>查询微信用户信息接口</h2>
<h3>接口说明</h3>
<p>用于查询微信用户的详细信息。</p>
<h3>请求URL</h3>
<ul>
<li>
<p>前缀
TEST:<a href="https://guide-api-test.feihe.com">https://guide-api-test.feihe.com</a>
UAT:<a href="https://guide-api-uat.feihe.com">https://guide-api-uat.feihe.com</a>
PROD:<a href="https://guide-api.feihe.com">https://guide-api.feihe.com</a></p>
</li>
<li>地址
<code>/wisdom-api/weixin/v1/api/wxWeChat/queryWeChatUserInfo</code></li>
</ul>
<h3>请求方式</h3>
<p>GET</p>
<h3>请求参数</h3>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>openId</td>
<td>是</td>
<td>string</td>
<td>微信用户openId</td>
</tr>
<tr>
<td>headers</td>
<td>是</td>
<td>string</td>
<td>请求头信息(详见下方)</td>
</tr>
</tbody>
</table>
<h4>请求头信息</h4>
<ul>
<li>
<p>system: NEW_MEMBER</p>
</li>
<li>必须携带header,名称为system,值为 NEW_MEMBER 代表 新会员系统;STOCK 代表 进销存系统</li>
</ul>
<h3>成功响应示例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 200,
&quot;&quot;: &quot;操作成功&quot;,
&quot;data&quot;: {
&quot;subscribe&quot;: true,
&quot;openId&quot;: &quot;oc63ewmuBYT1PkeC2IEsT0n2gggg&quot;,
&quot;nickname&quot;: &quot;&quot;,
&quot;sexDesc&quot;: &quot;未知&quot;,
&quot;sex&quot;: 0,
&quot;language&quot;: &quot;zh_CN&quot;,
&quot;city&quot;: &quot;&quot;,
&quot;province&quot;: &quot;&quot;,
&quot;country&quot;: &quot;&quot;,
&quot;headImgUrl&quot;: &quot;&quot;,
&quot;subscribeTime&quot;: 1695709077,
&quot;unionId&quot;: &quot;o-Jdx1uV6IcO2H-jKvh0Yziti-ws&quot;,
&quot;subscribeScene&quot;: &quot;ADD_SCENE_PROFILE_CARD&quot;,
}
}</code></pre>
<h3>失败响应</h3>
<pre><code>{
&quot;code&quot;: 402,
&quot;msg&quot;: &quot;不合法的 OpenID ,请开发者确认 OpenID (该用户)是否已关注公众号,或是否是其他公众号的 OpenID&quot;,
&quot;data&quot;: {
&quot;errcode&quot;: 40003,
&quot;errmsg&quot;: &quot;invalid openid hint: [qfbB6BsQf-IaIvsA] rid: 660cce04-7ec9fae1-710ce50c&quot;
}
}</code></pre>
<h3>响应参数</h3>
<p>code: 请求返回的码,200表示成功。</p>
<ul>
<li>msg 提示信息。
subscribe: 用户是否已关注公众号,true表示已关注。</li>
<li>openId: 用户的Open。</li>
<li>nickname: 用户昵称。</li>
<li>subscribeTime: 用户关注公众号的时间(时间戳)。</li>
<li>unionId: 用户的UnionID。</li>
<li>subscribeScene: 用户关注的渠道- qrScene: 二维码扫描场景值。</li>
</ul>