开发者社区 问答 正文

钉钉免登接口报错

export function getCode(callback) {
let corpId = 'xxxxx';
if (dd.env.platform !== "notInDingTalk") {
dd.ready(() => {
//使用SDK 获取免登授权码
dd.runtime.permission.requestAuthCode({
corpId: corpId,
onSuccess: (info) => {
// 根据钉钉提供的api 获得code后,再次调用这个callback方法
// 由于是钉钉获取code是异步操作,不知道什么时候执行完毕
// callback 函数会等他执行完毕后在自己调用自己
callback(info.code)
},
onFail: (err) => {
alert('fail');
alert(JSON.stringify(err));
},
});
});
}
}

报错:
{"errorCode":"-1","errorMessage":"Cannot read properties of undefined (reading 'body')"}`, errorCode: '-1'}

展开
收起
游客riwwlavvlss7w 2025-03-13 12:38:06 22 分享
分享
版权
来自: 钉钉开发者社区 举报
0 条回答
写回答
取消 提交回答
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等