彩豚云【星爸爸】开发文档

彩豚云开放平台【星爸爸】对接文档


获取access_token

<h3>获取access_token</h3> <blockquote> <p>access_token是开发者服务器请求彩豚云服务时携带在请求头中的验证字符串,使用JWT为认证基础; access_token有效时间为7200秒,开发者可依据自身业务,对access_token进行定时缓存的操作</p> </blockquote> <p><strong>用法:在请求头中添加<code>identification</code>字段,<code>identification</code>的值为获取到的access_token值</strong></p> <ul> <li> <p>请求接口 <code>GET:</code> <a href="https://v3.qiangrenwl.com/v3.0/api/auth/access_token">https://v3.qiangrenwl.com/v3.0/api/auth/access_token</a></p> </li> <li>请求参数</li> </ul> <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;">appid</td> <td style="text-align: left;">String</td> <td>开发者获取的appid;请前往彩豚云开放平台获取</td> </tr> <tr> <td style="text-align: left;">secretKey</td> <td style="text-align: left;">String</td> <td>访问密钥</td> </tr> </tbody> </table> <ul> <li>返回参数说明</li> </ul> <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;">access_token</td> <td style="text-align: left;">String</td> <td>access_token字符串</td> </tr> <tr> <td style="text-align: left;">expires_in</td> <td style="text-align: left;">int</td> <td>有效时间段;单位:秒</td> </tr> </tbody> </table> <ul> <li> <p>请求示例</p> <blockquote> <p><a href="https://v3.qiangrenwl.com/v3.0/api/auth/access_token?appid=xxxx&secretKey=xxxx">https://v3.qiangrenwl.com/v3.0/api/auth/access_token?appid=xxxx&secretKey=xxxx</a></p> </blockquote> </li> <li>返回示例</li> </ul> <pre><code class="language-json">{ "msg": "操作成功", "code": 200, "data": { "access_token": "Nnl3akw5TU9ieVNjQVl2WFFpZ25hVzRBNjZIcElFaVYxemlrd2ZzTi8reXk1NE1zK2VwaXFLdFVyWTVzcnJ0bjR6Z2JZUkhVS0wxc2krM3hCcW0wWXAyOFNVN2wrU2JrY0M2ZFErVDZOSGhaY2EwVjh3eFM1YlRKcG8rTlgreFlkY3JEQnlTd3dueVpKNXQxV0Z4a1Q4bWZLKzlYZW44YjhwQ1JMODVPek5EWVMxekFiYWQrR2NoZ21LUUk4aGVt", "expires_in": 7200 } }</code></pre>

页面列表

ITEM_HTML