5.2用户联登接口
<p>5.2用户联登接口</p>
<p>路径: /api/open/getMemberAccessToken</p>
<p>方法: POST</p>
<p>POST 参数:</p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>长度限制</th>
<th>是否必填</th>
<th>介绍</th>
</tr>
</thead>
<tbody>
<tr>
<td>thirdUserId</td>
<td>String</td>
<td></td>
<td>是</td>
<td>第三方用户唯一标示</td>
</tr>
<tr>
<td>phone</td>
<td>String</td>
<td></td>
<td>否</td>
<td>用户手机号</td>
</tr>
<tr>
<td>nickName</td>
<td>String</td>
<td>32</td>
<td>否</td>
<td>昵称 ,可选</td>
</tr>
<tr>
<td>avatar</td>
<td>String</td>
<td>256</td>
<td>否</td>
<td>头像,可选</td>
</tr>
</tbody>
</table>
<p>header:</p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>长度限制</th>
<th>是否必填</th>
<th>介绍</th>
</tr>
</thead>
<tbody>
<tr>
<td>Authorization</td>
<td>String</td>
<td></td>
<td>是</td>
<td>Bearer 客户认证令牌</td>
</tr>
</tbody>
</table>
<pre><code>{
&quot;thirdUserId&quot;: &quot;Th0000001&quot;,
&quot;phone&quot;: &quot;13800000000&quot;,
&quot;realName&quot;: &quot;王大头 (选填)&quot;,
&quot;nickName&quot;: &quot;烈熊 (选填)&quot;,
&quot;avatar&quot;: &quot;http://xxxxx.png (选填)&quot;
}</code></pre>
<p>返回:</p>
<table>
<thead>
<tr>
<th>字段名称</th>
<th>类型</th>
<th>长度限制</th>
<th>介绍</th>
</tr>
</thead>
<tbody>
<tr>
<td>accessToken</td>
<td>String</td>
<td>64</td>
<td>用户登录token</td>
</tr>
<tr>
<td>expiresIn</td>
<td>Date</td>
<td></td>
<td>token有效期单位:分钟,换算是7天</td>
</tr>
<tr>
<td>expiration</td>
<td>Long</td>
<td></td>
<td>过期时间</td>
</tr>
</tbody>
</table>
<pre><code>{
&quot;code&quot;: &quot;0&quot;,
&quot;data&quot;: {
&quot;accessToken&quot;: &quot;OPEN_MEMBER.95a972c3c65247f0908bf115fa577a31.62428497&quot;,
&quot;expiration&quot;: &quot;2022-03-29 12:01:27&quot;,
&quot;expiresIn&quot;: 10080
},
&quot;message&quot;: &quot;请求成功&quot;,
&quot;success&quot;: true
}</code></pre>
<p>> 后面文档header 部分的token 需要这个参数。</p>
<p>错误:</p>
<table>
<thead>
<tr>
<th>codes</th>
<th>问题描述</th>
<th>解决</th>
</tr>
</thead>
<tbody>
<tr>
<td>401</td>
<td>Bearer令牌不允许为空/token无效</td>
<td>请检查Authorization参数</td>
</tr>
<tr>
<td>10003</td>
<td>关联的客户 (供应商)被移除或已禁用</td>
<td>请联系烈熊方产品核对</td>
</tr>
<tr>
<td>10004</td>
<td>缺少参数</td>
<td>具体内容查阅返回的message字段</td>
</tr>
</tbody>
</table>