🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
#### 接口路径:https://dev.lingju.ai/httpapi/authorize.do <table style="width:100%"> <tbody> <tr height="28" style="font-weight:bold;"> <td height="28" width="130px" >名称</td> <td colspan="3" >授权认证接口</td> </tr> <tr height="28" style="font-weight:bold;"> <td height="28" >接口路径</td> <td colspan="3" >https://dev.lingju.ai/httpapi/authorize.do</td> </tr> <tr height="28" style="font-weight:bold;"> <td height="28" >请求方式</td> <td colspan="3" >get/post</td> </tr> </tbody> </table> #### http get请求示例: ~~~ 用于硬件平台: https://dev.lingju.ai/httpapi/authorize.do?appkey=xxxxx&userid=xxxx&authcode=xxxxx 用于软件平台: https://dev.lingju.ai/httpapi/authorize.do?appkey=xxxxx&userid=xxxx ~~~ #### 请求参数说明: <table style="width:100%"> <thead> <tr height="28"> <th width="130px">参数</th> <th width="100px">数据类型</th> <th width="130px">可需</th> <th>描述</th> </tr> </thead> <tbody> <tr height="23" style="height:17.25pt"> <td height="23" >appkey</td> <td >String</td> <td>必填</td> <td >分配给开发者的专属appkey,请妥善保管</td> </tr> <tr height="92" > <td height="92">userid</td> <td>String</td> <td>必填</td> <td >终端用户的唯一标识,移动设备建议使用mac地址,入网许可号等,注意取值必须为:[A-Za-z0-9]。请开发者务必注意区分userid,智能云根据userid标识终端id并实现授权限制及个性化的上下文应答。</td> </tr> <tr height="69" style="height:51.75pt"> <td>authcode</td> <td>String</td> <td>用于硬件必填<br/>软件不填</td> <td>给开发者分配的授权码,由开发者自行管理</td> </tr> </tbody> </table> #### 接口返回JSON示例: ~~~ { "description":"success", "data":{ "accessToken":"9dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "expires":87, "update":147xxxxxxxxxxxxx, }, "status":0 } ~~~ #### 接口返回说明: ~~~ Content-Type:application/json;charset=UTF-8 ~~~ <table style="width:100%"> <thead> <tr height="28" > <th height="28" width="130px">属性名</th> <th width="100px">数据类型</th> <th colspan="2">描述</th> </tr> </thead> <tbody> <tr height="23"> <td height="23" >status</td> <td>int</td> <td colspan="2">状态码,0=成功,其它值则为错误码,请参考错误码表</td> </tr> <tr height="23"> <td height="23" >description</td> <td >String</td> <td colspan="2">通常为空,出错时会有错误信息</td> </tr> <tr > <td rowspan="3" >data</td> <td rowspan="3" >JSON</td> <td width="50px">accessToken</td> <td>访问码,string</td> </tr> <tr > <td width="50px">expires</td> <td>有效期,int,天数</td> </tr> <tr > <td width="50px">updated</td> <td>时间戳,long</td> </tr> </tbody></table>