当前位置: 首页 > ai >正文

智能小e-集成配置

前言

  • 集成配置
  • 同步
  • 单点
  • 外联系统
  • 智能办公
  • 智能问答
  • 智能体

本文主要讲解,第三方如何集成智能小e,集成常见问题和解决方案;

1、泛微OA产品集成

  • e9集成,访问地址
  • e10集成,访问地址

2、第三方如何集成

2.1、集成地址

集成地址,分为两个部分:

  • 域名地址,如:https://cloud.qianliling.com/main
    • pc端: https://cloud.qianliling.com/main/app-chat
    • 移动端: https://cloud.qianliling.com/mobile-chat/#/index
    • 移动端隐藏语音
      https://cloud.qianliling.com/mobile-chat/#/index?disableVoice=true
    • pc端插件地址
      https://cloud.qianliling.com/main/app-chat/chat-em
    • 采知连地址
      https://cloud.qianliling.com/main/app-chat?czl=1
  • 参数clientSourceuserToken

下面是集成登录的示例:

  • pc端访问 https://cloud.qianliling.com/main/app-chat?clientSource=ecology&userToken=${userToken}
    在这里插入图片描述
  • pc端插件地址访问 https://cloud.qianliling.com/main/app-chat/chat-em?clientSource=ecology&userToken=${userToken}

在这里插入图片描述

  • 手机端访问 https://cloud.qianliling.com/mobile-chat/#/index?clientSource=ecology&userToken=${userToken}
    在这里插入图片描述

2.2、获取密钥

字段说明
appKey集成千里聆API调用信息,API秘钥中的SecretId,参考下图
secretKey集成千里聆API调用信息,API秘钥中的SecretIdKey,参考下图

在这里插入图片描述

2.3、如何生成签名sign

加密生成sign参数需要四个参数生成,分别是:appKeysecretKeyparamstimestamp

字段说明
appKey集成千里聆API调用信息,API秘钥中的SecretId
secretKey集成千里聆API调用信息,API秘钥中的SecretIdKey
params自选参数,json格式的对象,key-value都是字符串。 示例值: {“appKey”: “dsfs”}
timestamp当前时间戳(毫秒数)。示例值:1627983230687

说明
关于sign生成规则,生成方式:Md5(appKey + secretKey + params + timestamp).toUpperCase()
关于md5加密参数使用的是第三方jar包:commons-codec-1.13.jar,自己实现时,参考上述依赖包标准即可。

参数params说明
单点登录时,关于参数params不能为空,其中必填字段,如下

字段说明
appKey集成千里聆API调用信息,API秘钥中的SecretId,参考上图
clientSourceString, 登录客户端类型值为:e9, e10 , e-teams , e-office , qiyuesuo , 默认ecology
ecUserId用户id,这里是ecology人员id
ecUserName用户姓名
appSkip登录后直接跳转的页面地址

参考示例代码:

public class SingleParam {// 千里聆给客户分配的AK--例如:mD0XRABCprivate String appKey;// 千里聆给客户分配的SK--例如:sdfssafdsafdasfdasf32423423private String secretKey;// 登录客户端类型 登录客户端类型值为:`e9`, `e10` , `e-teams` , `e-office` , `qiyuesuo` , `ecology`默认private String clientSource;//  第三方人员唯一标识private String ecUserId;// 用户姓名private String ecUserName;// 单点登录后访问的页面地址private String appSkip;/*** 构造 加密参数 用于点单登录*/public Map<String, String> getParams(){Map<String, String> params = new HashMap<>();params.put("appKey", URLEncoder.encode(appKey, "utf-8"));params.put("clientSource", URLEncoder.encode(clientSource, "utf-8"));params.put("ecUserId", URLEncoder.encode(ecUserId, "utf-8"));params.put("ecUserName", URLEncoder.encode(ecUserName, "utf-8"));params.put("appSkip", URLEncoder.encode(appSkip, "utf-8"));return params;}
}

2.4、如何生成userToken

  • 接口地址(URI):https://cloud.qianliling.com/rpa/auth/app/user/generateUserToken
  • 接口请求类型:POST
  • 接口内容类型:Content-Type: application/json

接口参数
参数示例:

{"appKey": "fafa43234","sign": "fsd68fsaf823fsdfafas","timestamp": "16669000200","params": {"appKey": "wwrwer","clientSource": "ecology","ecUserId": "1234","ecUserName": "zhangsan","appSkip": ""}
}

参数说明

参数名称类型描述
appKeyString集成千里聆API调用信息,API秘钥中的SecretId,参考2.2、获取密钥
signString签名,按照appKey、secretKey、params、timestamp的顺序进行拼接生成的16进制大写的MD5字符串,参考2.3、如何生成签名sign
timestampString当前时间戳(毫秒数)。示例值:1627983230687
paramsObject自选参数,json格式的对象, 参考:SingleParam

接口返回结果

{"code": "0000","msg": "请求成功","data": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwZXJtaXNzaWc..."
}
返回字段类型描述
codeString0000-表示成功,否则失败
msgString失败信息
dataStringuserToken的值

参考示例代码:

说明
关于sign生成规则,需要使用params ,这里使用HashMap实现,无法保证顺序,所有json序列化时,为了保证一致,请使用gson


public class Demo {private String url = "https://cloud.qianliling.com/rpa/auth/app/user/generateUserToken";public String getToken() {String appKey = "";String secretKey = "";SingleParam singleParam = new SingleParam();// 注意这里使用HashMap,无法保证顺序,所有json序列化时,为了保证一致,请使用gsonMap<String, String> params = singleParam.getParams();long timestamp = System.currentTimeMillis();String str = appKey + secretKey + params + timestamp;String sign = DigestUtils.md5Hex(str.getBytes()).toUpperCase();Map<String, Object> body = new HashMap<>();body.put("appKey", appKey);body.put("params", params);body.put("timestamp", timestamp);body.put("sign", sign);String userToken = null;// 执行 httpClient 调用, 请参考:生成userToken 接口文档CloseableHttpClient httpClient = HttpClients.createDefault();CloseableHttpResponse httpResponse = null;try {HttpPost httpPost = new HttpPost(url);httpPost.setHeader("Content-Type", "application/json;charset=UTF-8");// 创建 HttpPost 参数Gson gson = new Gson();StringEntity stringEntity = new StringEntity(gson.toJson(body), "UTF-8");httpPost.setEntity(stringEntity);httpResponse = httpClient.execute(httpPost);String content = EntityUtils.toString(httpResponse.getEntity(), StandardCharsets.UTF_8);Map<String, String> resMap = gson.fromJson(content, new TypeToken<Map<String, String>>() {}.getType());// 获取 userToken 并返回userToken = resMap.get("data");} catch (Exception e) {} finally {try {if (httpResponse != null) {httpResponse.close();}} catch (IOException e) {e.printStackTrace();}try {if (httpClient != null) {httpClient.close();}} catch (IOException e) {e.printStackTrace();}}return userToken;}
}

3、常见问题和解决方案

  • e9集成,访问地址
  • e10集成,访问地址
http://www.xdnf.cn/news/16017.html

相关文章:

  • 自动化运维:从脚本到DevOps的演进
  • Java设计模式-备忘录模式
  • Leetcode力扣解题记录--第240题(矩阵搜索)
  • 基于 Qiankun 的微前端实践案例:电商平台多模块整合方案
  • java通过com进行pdf转换docx丢失
  • js面试题 高频(1-11题)
  • 观影《长安的荔枝》有感:SwiftUI 中像“荔枝转运”的关键技术及启示
  • Apache POI 介绍与使用指南
  • Day01_C++
  • ctfshow pwn40
  • CVE-2025-32463漏洞:sudo权限提升漏洞全解析
  • 网络基础17:IRF实验(H3C设备)
  • Dify实战,获取禅道需求,编写测试用例到禅道
  • 【图像翻转+图像的仿射变换】——图像预处理(OpenCV)
  • 05-ES6
  • 【Spring Cloud Gateway 实战系列】基础篇:路由、断言、过滤器、负载均衡深度解析
  • vscode怎么安装MINGW
  • 利用 Playwright MCP 构建浏览器自动化流程:技术路径与操作解析
  • Spring @Value注解终极指南
  • 传统RNN模型笔记:输入数据长度变化的结构解析
  • 二分查找----2.搜索二维矩阵
  • docker部署postgresql
  • 美区跨境卖家尾程物流怎么操作?美国跨境物流自发货走什么?
  • 力扣146:LRU缓存
  • DIOR-ViT:用于病理图像癌症分类的差分序数学习视觉Transformer|文献速递-医学影像算法文献分享
  • 基于Python flask的常用AI工具功能数据分析与可视化系统设计与实现,技术包括LSTM、SVM、朴素贝叶斯三种算法,echart可视化
  • LIMO:仅需817样本激活大模型数学推理能力,挑战“数据规模至上”传统范式
  • 传统RNN模型
  • 嵌入式开发学习(第三阶段 Linux系统开发)
  • 2025年6月GESP(C++五级):最大公因数