【130】调用Sign
<p>[TOC]</p>
<h5>接口状态</h5>
<ul>
<li><code>正常</code></li>
</ul>
<h5>框架版本</h5>
<ul>
<li><code>≥ 2.2.8.0</code></li>
</ul>
<h5>更新时间</h5>
<ul>
<li><code>2025/05/31</code></li>
</ul>
<h5>调用额度</h5>
<ul>
<li><code>免额度</code></li>
</ul>
<h5>简要描述</h5>
<ul>
<li>调用SignX封装自定义接口,抓包教程详见 [1分钟学会抓包封装自定义接口](<a href="https://www.showdoc.com.cn/sainiu/11558432551676185">https://www.showdoc.com.cn/sainiu/11558432551676185</a> "1分钟学会抓包封装自定义接口")</li>
<li>POST参数data需要进行base64编码,若编码后的文本存在“+”则需要进行转义为“/+”后提交。</li>
<li>POST参数cookie需要进行base64编码,若编码后的文本存在“+”则需要进行转义为“/+”后提交。</li>
</ul>
<h5>DLL调用例子</h5>
<pre><code>Api_InvokeSign(&quot;$userNick$&quot;,&quot;mtop.taobao.cus.tb.user.get&quot;,&quot;1.0&quot;,&quot;{}&quot;,0)</code></pre>
<h5>易语言模块调用例子</h5>
<pre><code>SaiNiu.Api.调用Sign(&quot;$userNick$&quot;,&quot;mtop.taobao.cus.tb.user.get&quot;,&quot;1.0&quot;,&quot;{}&quot;,0)</code></pre>
<h5>POST调用例子 data需进行base64编码</h5>
<pre><code>http://127.0.0.1:3030/SaiNiuApi/Api</code></pre>
<pre><code>&amp;post=InvokeSign&amp;data={&quot;data&quot;:&quot;e30%3D&quot;,&quot;userNick&quot;:&quot;$userNick$&quot;,&quot;api&quot;:&quot;mtop.taobao.cus.tb.user.get&quot;,&quot;cookie&quot;:&quot;&quot;,&quot;v&quot;:&quot;1.0&quot;,&quot;ip&quot;:&quot;&quot;,&quot;way&quot;:0,&quot;appKey&quot;:0}</code></pre>
<h5>参数</h5>
<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>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">userNick</td>
<td style="text-align: left;">文本型</td>
<td style="text-align: left;">二选一</td>
<td style="text-align: left;">千牛账号,为方便测试$userNick$表示取随机队列账号</td>
<td>tb123456</td>
</tr>
<tr>
<td style="text-align: left;">cookie</td>
<td style="text-align: left;">文本型</td>
<td style="text-align: left;">二选一</td>
<td style="text-align: left;">POST请求时需将cookie转为base64编码提交</td>
</tr>
<tr>
<td style="text-align: left;">api</td>
<td style="text-align: left;">文本型</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">接口</td>
<td>mtop.taobao.cus.tb.user.get</td>
</tr>
<tr>
<td style="text-align: left;">v</td>
<td style="text-align: left;">文本型</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">接口版本</td>
<td>1.0</td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">文本型</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">提交参数,需要进行base64编码后提交</td>
<td>e30=</td>
</tr>
<tr>
<td style="text-align: left;">way</td>
<td style="text-align: left;">整数型</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">请求类型[0]GET[1]POST</td>
<td>0</td>
</tr>
<tr>
<td style="text-align: left;">appKey</td>
<td style="text-align: left;">整数型</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">请求APPID 不清楚留空0</td>
<td>0</td>
</tr>
<tr>
<td style="text-align: left;">ip</td>
<td style="text-align: left;">文本型</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">通过代理IP请求,不清楚留空</td>
<td>1.2.3.4</td>
</tr>
</tbody>
</table>
<h5>返回示例</h5>
<pre><code>{&quot;code&quot;:200,&quot;data&quot;:{&quot;model&quot;:{&quot;avatarStatus&quot;:&quot;false&quot;,&quot;decoration&quot;:&quot;https://gw.alicdn.com/mt/TB1FpaljAL0gK0jSZFtXXXQCXXa-300-300.png&quot;,&quot;displayName&quot;:&quot;&quot;,&quot;gender&quot;:&quot;男&quot;,&quot;guangRole&quot;:&quot;NORMAL&quot;,&quot;homePageUrl&quot;:&quot;https://tesi-assets.m.taobao.com/app/mtb/app-onion-note-weex/pages/user?disableNav=YES&amp;userId=v2bwdtNp43siPmztaEqJwg%3D%3D&amp;keyName=kc_lightspeed&quot;,&quot;jianghuNick&quot;:&quot;怼怼更贱康&quot;,&quot;selfIntro&quot;:&quot;xxx&quot;,&quot;updateNotice&quot;:&quot;&quot;,&quot;userLogo&quot;:&quot;https://img.alicdn.com/sns_logo/i3/796978238/O1CN01OXPmmL2Aj3qGJGdvJ_!!796978238-0-userheaderimgshow.jpg&quot;,&quot;userNick&quot;:&quot;tb9403060_2011&quot;}},&quot;ret&quot;:[&quot;SUCCESS::调用成功&quot;]}</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;">code</td>
<td style="text-align: left;">整数型</td>
<td>返回结果,成功=200,失败≠200</td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">文本型</td>
<td>调用结果</td>
</tr>
<tr>
<td style="text-align: left;">reg</td>
<td style="text-align: left;">文本型</td>
<td>结果说明,调用成功或失败原因</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>