新权益开放API文档--1.0(废弃)

烈熊新权益系统


5.1 客户授权接口

<p>1.1客户授权接口</p> <p>接口说明</p> <p>注意: 在调用的时候需要先添加IP白名单</p> <p>请求路径: /api/open/auth</p> <p>请求方法: POST</p> <p>请求参数:<br /> sign 签名将 appKey + 时间戳 + 秘钥 拼接做sha256 加密 之后 转十六进制</p> <table> <thead> <tr> <th>参数名称</th> <th>类型</th> <th>长度限制</th> <th>是否必填</th> <th>介绍</th> </tr> </thead> <tbody> <tr> <td>appKey</td> <td>String</td> <td>50</td> <td>是</td> <td>客户的appKey</td> </tr> <tr> <td>sign</td> <td>String</td> <td>100</td> <td>是</td> <td>验签,生成办法sha256Hex(appKey + timestamp + appSecret)</td> </tr> <tr> <td>timestamp</td> <td>String</td> <td>50</td> <td>是</td> <td>时间戳</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;appKey&amp;quot;: &amp;quot;test1395648658046414850&amp;quot;, &amp;quot;timestamp&amp;quot;: &amp;quot;1647920715145&amp;quot;, &amp;quot;sign&amp;quot;: &amp;quot;c716b85bb3ad1a65550e9a4c16b756d51567f8f6c4b43998b3eb962e1436e180&amp;quot; }</code></pre> <p>返回:</p> <table> <thead> <tr> <th>字段名称</th> <th>类型</th> <th>长度限制</th> <th>介绍</th> </tr> </thead> <tbody> <tr> <td>accessToken</td> <td>String</td> <td></td> <td>唯一标识</td> </tr> <tr> <td>expiration</td> <td>Long</td> <td></td> <td>过期时间</td> </tr> <tr> <td>expiresIn</td> <td>Date</td> <td></td> <td>有效期单位:分钟</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;code&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;accessToken&amp;quot;: &amp;quot;OPEN_API.f319b8a8b3f7466e9c36993323f38b08.62428464&amp;quot;, &amp;quot;expiration&amp;quot;: &amp;quot;2022-03-29 12:00:36&amp;quot;, &amp;quot;expiresIn&amp;quot;: 10080 }, &amp;quot;message&amp;quot;: &amp;quot;请求成功&amp;quot;, &amp;quot;success&amp;quot;: true }</code></pre> <p>错误:</p> <table> <thead> <tr> <th>codes</th> <th>问题描述</th> <th>解决</th> </tr> </thead> <tbody> <tr> <td>10001</td> <td>IP 不在白名单</td> <td>请联系烈熊方产品添加白名单</td> </tr> <tr> <td>10002</td> <td>签名错误</td> <td>1.请检查加密算法 2.请与烈熊方产品核对appId和appKey</td> </tr> <tr> <td>10003</td> <td>客户不存在</td> <td>请联系烈熊方产品核对appKey和appSecret是否正确</td> </tr> <tr> <td>10004</td> <td>缺少参数</td> <td>具体内容查阅返回的message字段</td> </tr> </tbody> </table>

页面列表

ITEM_HTML