@myyzs
        
        2022-08-31T03:16:39.000000Z
        字数 962
        阅读 158
    明源待办角标
根据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秒
/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的时候代表成功,其他为错误码
