[关闭]
@myyzs 2022-08-31T03:16:39.000000Z 字数 962 阅读 150

获取明源待办角标接口(通用)

明源待办角标

说明

  1. 测试域名地址:https://qy-ci.fdccloud.com
  2. 预发域名地址:https://qy-qa.fdccloud.com
  3. 生产域名地址: https://www.fdccloud.com

1.获取access_token

根据corpid和corpsecret获取获取access_token

接口地址:

HOST/api/tenant-open/get-access-token

传参方式 :

POST

参数:

{
    "corpid":"corpid,租户的唯一标识", //云助手后台获取
    "corpsecret":"租户的secret"  //云助手后台获取
}

corpid和corpsecret参数获取途径:
登录企业后台->设置中心->企业设置可以看到这个参数

返回结果:

成功返回

{
    "errcode": 0,
    "errmsg": "ok",
    "data": "xxxxxxxxxxxxx"   //access_token值
}

失败返回

{
    "errcode":"错误code",
    "errmsg":"错误信息",
    "data":""
}

说明

1.errcode 为0的时候代表成功,data值为access_token的值,为后面接口使用
2.access_token有效期为7200秒

2.获取明源应用待办数量

/api/tenant-open/get-msg-num?access_token=xxxxxxx

传参方式

POST

{
    "app_code":"3022",
    "user_type":"erp",
    "user_id":"zhangs3"
}

参数说明

参数 说明
app_code 应用标识:3022:移动审批、3042:移动计划
user_type 用户类型:erp、dingtalk、wx、multi_wx1、multi_wx2、multi_wx3
user_id 用户标识:erp的user_code、钉钉的用户id、微信的用户id

返回结果

成功

{
  "errcode": 0,
  "errmsg":"错误信息",
  "data":{ 
      "msg_num":10,
      "message":"你有10条待办流程"
  }
}  

失败返回

{
    "errcode":"错误code",
    "errmsg":"错误信息",
    "data":""
}

说明

1.errcode 为0的时候代表成功,其他为错误码

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注