获取令牌
<h1>获取 access_token</h1>
<h5>简要描述</h5>
<ul>
<li>获取通行令牌</li>
</ul>
<h5>请求url</h5>
<p><code>https://api.baigolf.com/v3/auth/access_token</code></p>
<h5>请求方式</h5>
<ul>
<li>POST</li>
</ul>
<h5>请求参数</h5>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>service_id</td>
<td>是</td>
<td>string</td>
<td>分配给API用户的服务ID</td>
</tr>
<tr>
<td>service_key</td>
<td>是</td>
<td>string</td>
<td>分配给API用户的密钥</td>
</tr>
</tbody>
</table>
<h5>返回参数详情</h5>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>error</td>
<td>array</td>
<td></td>
</tr>
<tr>
<td>error.code</td>
<td>string</td>
<td>错误代码</td>
</tr>
<tr>
<td>error.message</td>
<td>string</td>
<td>错误描述</td>
</tr>
<tr>
<td>data</td>
<td>array</td>
<td></td>
</tr>
<tr>
<td>data.access_token</td>
<td>string</td>
<td>令牌</td>
</tr>
<tr>
<td>data.expired_at</td>
<td>int</td>
<td>有效期</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<pre><code class="language-json">{
&quot;error&quot;: {
&quot;code&quot;: &quot;0&quot;,
&quot;message&quot;: &quot;&quot;
},
&quot;data&quot;: {
&quot;access_token&quot;: &quot;0d09929601dcD51766d05B1ADB24773E0805B57Fa325B5C954Z893IHk4ldRgENetJNk2rtcYGwhUwt3T&quot;,
&quot;expired_at&quot;: 1718792013
}
}</code></pre>