设备注册及授权
<p><strong>简要描述 </strong></p>
<p>[TOC]</p>
<h5>简要描述</h5>
<ul>
<li>访问其他接口先预先通过本接口拿到访问的token,<strong>一设备只能同时有一个token,如混合会导致错乱或不通</strong></li>
<li>此授权token只能访问限制性的几个接口,如:拍图搜题</li>
<li>license 可通过联系玩瞳商务 开通应用,并在玩瞳后台下载</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>https://client-api1.51wanxue.com/api-client/login/thirdClient</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>GET/POST </li>
<li>form-data</li>
</ul>
<h5>参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">license</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>找玩瞳商务提供的app静态license数据</td>
</tr>
<tr>
<td style="text-align: left;">deviceId</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>设备唯一标识,设备id或设备SN可以表示机器唯一编码即可,同一设备id只能同时有一个token,如混合会导致错乱或不通</td>
</tr>
<tr>
<td style="text-align: left;">model</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>设备id对应的机器型号,</td>
</tr>
</tbody>
</table>
<h5>返回示例</h5>
<pre><code>{
&quot;code&quot;: 0,
&quot;msg&quot;: &quot;ok&quot;,
&quot;data&quot;: {
&quot;expire&quot;: 5400,
&quot;openId&quot;: &quot;2662a0fb54e511ed830e0c42a1e80062&quot;,
&quot;verification&quot;: &quot;lTS689jxlthRfj2Var9YAbsc33/qRfYTc7afgprSMMW8rp523rDp/Yd1TJLcA19x7ZMiJnXXwkEkYjSf+QqCC3lDclTmhG+eL1VQ4dDCxvD59DwkhGaqsK1HMQgvHaIpFYSwB3yHa679YA7wf2JNpUSRANCt0WVoVrP0OzPfHls=&quot;,
&quot;encryptKey&quot;: null,
&quot;fingerRead&quot;: 0,
&quot;activeExpired&quot;: false,
&quot;qrCode&quot;: null,
&quot;evaluation&quot;: 0,
&quot;token&quot;: &quot;tc_afa3b9e4721e7210ac69d46a122dc67c&quot;
}
}</code></pre>
<h5>调用其他业务接口时,错误返回案例 :token过期</h5>
<pre><code>{
&quot;code&quot;: 1001,
&quot;msg&quot;: &quot;Token is missing or invalid.&quot;,
&quot;data&quot;: null
}</code></pre>
<h5>返回参数说明</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">openId</td>
<td style="text-align: left;">string</td>
<td>玩瞳为该设备分配的唯一id ,后续有些业务会使用改字段</td>
</tr>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;">string</td>
<td>请求其他接口的token值</td>
</tr>
<tr>
<td style="text-align: left;">expire</td>
<td style="text-align: left;">有效时间</td>
<td>单位:秒 固定5400S</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>更多返回错误代码请看首页的[错误代码](<a href="https://www.showdoc.com.cn/visiontalk/2029190456880607">https://www.showdoc.com.cn/visiontalk/2029190456880607</a> "错误代码")描述</li>
</ul>