@myyzs
2020-12-10T02:59:24.000000Z
字数 748
阅读 181
明源待办角标
重要:此文档已废弃,请移步 https://www.zybuluo.com/myyzs/note/1761634
根据corpid和corpsecret获取获取access_token
接口地址:
HOST/api/tenant-open/get-access-token
传参方式 :
POST
参数:
{
"corpid":"corpid,租户的唯一标识", //云助手后台获取
"corpsecret":"租户的secret" //云助手后台获取
}
返回结果:
成功返回
{
"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-sp-msg-num?access_token=xxxxxxx&userid=xxxx
GET
- userid:钉钉中的userid
成功
{
"errcode": 0,
"errmsg":"错误信息",
"data":{
"sp_num":10
}
}
失败返回
{
"errcode":"错误code",
"errmsg":"错误信息",
"data":""
}
1.errcode 为0的时候代表成功,其他为错误码