车享-嗨拉运好车接口文档

嗨拉运好车开放平台API文档


2 应用身份验证

<h3>功能描述</h3> <p>您在调用其他接口前,需要先通过此接口获取<code>TOKEN</code>,<code>TOKEN</code>是其他接口的身份验证凭据。</p> <p>使用给定的<code>application_id</code>和<code>application_secret</code>获取token值。</p> <h3>请求URL</h3> <p><code>https://api.hlyunche.com/authorization/v1/oauth/token</code></p> <h3>请求方式</h3> <ul> <li>POST</li> </ul> <h3>请求参数</h3> <ul> <li>Headers</li> </ul> <table> <thead> <tr> <th>key</th> <th>value</th> </tr> </thead> <tbody> <tr> <td>Content-Type</td> <td>application/json</td> </tr> </tbody> </table> <ul> <li>Body</li> </ul> <p>应用ID<code>application_id</code>和密钥<code>application_secret</code>的获取方法参考见:<a href="https://www.showdoc.com.cn/1506017232980380/7266408921451032">API能力与开通</a></p> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>grant_type</td> <td>是</td> <td>string</td> <td>输入&quot;TPA&quot;</td> </tr> <tr> <td>application_id</td> <td>是</td> <td>string</td> <td>企业应用ID</td> </tr> <tr> <td>application_secret</td> <td>是</td> <td>string</td> <td>应用密钥</td> </tr> </tbody> </table> <h4>Body示例</h4> <pre><code>{ "grant_type": "TPA", "application_id": APPLICATION_ID, "application_secret": APPLICATION_SECRET }</code></pre> <h3>返回参数</h3> <table> <thead> <tr> <th>字段</th> <th>字段类型</th> <th>字段说明</th> </tr> </thead> <tbody> <tr> <td>access_token</td> <td>string</td> <td>token值</td> </tr> </tbody> </table> <h4>返回结果示例</h4> <pre><code class="language-json">{     "success": true,     "data": {         "access_token": "XXXXXXXXXXXXXXXXXXXXXXXXXX",         "token_type": "Bearer",         "expires_in": 31536000000,         "expires_at": 1666062184141     } }</code></pre>

页面列表

ITEM_HTML