4.3联合登陆接口
<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 class="language-json">{
"thirdUserId": "Th0000001",
"phone": "13800000000",
"realName": "王大头 (选填)",
"nickName": "烈熊 (选填)",
"avatar": "http://xxxxx.png (选填)"
}</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有效期单位:分钟</td>
</tr>
<tr>
<td>expiration</td>
<td>Long</td>
<td></td>
<td>过期时间</td>
</tr>
</tbody>
</table>
<pre><code class="language-json">{
"code": "0",
"data": {
"accessToken": "OPEN_MEMBER.95a972c3c65247f0908bf115fa577a31.62428497",
"expiration": "2022-03-29 12:01:27",
"expiresIn": 10080
},
"message": "请求成功",
"success": true
}</code></pre>
<blockquote>
<p>后面文档header 部分的token 需要这个参数。</p>
</blockquote>
<p>错误:</p>
<table>
<thead>
<tr>
<th style="text-align: left;">codes</th>
<th style="text-align: left;">问题描述</th>
<th style="text-align: left;">解决</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">401</td>
<td style="text-align: left;">Bearer令牌不允许为空/token无效</td>
<td style="text-align: left;">请检查Authorization参数</td>
</tr>
<tr>
<td style="text-align: left;">10003</td>
<td style="text-align: left;">关联的客户 (供应商)被移除或已禁用</td>
<td style="text-align: left;">请联系烈熊方产品核对</td>
</tr>
<tr>
<td style="text-align: left;">10004</td>
<td style="text-align: left;">缺少参数</td>
<td style="text-align: left;">具体内容查阅返回的message字段</td>
</tr>
</tbody>
</table>