呼叫接口

呼叫接口


清除Token接口

<p>说明:当有新增分机或是分机进行调整后出现异常时,可以通过该接口清除Token后,再重新获取Token继续操作。</p> <h4>请求方式:POST,form-data格式</h4> <p><strong>请求参数</strong></p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th style="text-align: left;">是否必须</th> <th style="text-align: left;">说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">service</td> <td style="text-align: left;">string</td> <td style="text-align: left;">是</td> <td style="text-align: left;">App.Sip_Auth.Logout</td> </tr> <tr> <td style="text-align: left;">token</td> <td style="text-align: left;">string</td> <td style="text-align: left;">是</td> <td style="text-align: left;">Token字符串</td> </tr> </tbody> </table> <p><strong>接口请求示例(PHP)</strong></p> <pre><code>&amp;lt;?php $apiUrl = 'http://127.0.0.1:8080'; $postFields = [ 'service' =&amp;gt; ' App.Sip_Auth.Logout', 'token' =&amp;gt; 'ABCDEFG', ]; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $apiUrl); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($curl); $curlError = curl_error($curl); curl_close($curl); var_dump($response); ?&amp;gt; </code></pre> <p><strong>返回数据结构示例</strong></p> <pre><code>{ &amp;quot;ret&amp;quot;: 200, &amp;quot;data&amp;quot;: { &amp;quot;status&amp;quot;: 0, &amp;quot;desc&amp;quot;: &amp;quot;注销成功&amp;quot;, &amp;quot;reqtime&amp;quot;: 1602655204, &amp;quot;rsptime&amp;quot;: 1602655204 }, &amp;quot;msg&amp;quot;: &amp;quot;&amp;quot; }</code></pre>

页面列表

ITEM_HTML