$url = "https://qyapi.weixin.qq.com/cgi-bin/kf/sync_msg?access_token={$access_token}";
$data = [
'token' => $token,
'limit' => $limit,
];
$res = $this->curl_post($url, json_encode($data));
$res = json_decode($res, 1);
if (isset($res['errcode']) && $res['errcode'] != 0) {
throw new SwarmTipsException(get_tips_data('获取用户发送信息失败,错误码:' . $res['errcode'], __FILE__, __LINE__));
}
通过上面代码获取的external_userid
//查询用户信息
$url = "https://qyapi.weixin.qq.com/cgi-bin/kf/customer/batchget?access_token={$access_token}";
$post_data = [
'access_token'=>$access_token,
'external_userid_list'=>$external_userid,
];
$res = $this->curl_post($url,json_encode($post_data));
$res = json_decode($res, 1);
if (isset($res['errcode']) && $res['errcode'] != 0) {
throw new SwarmTipsException(get_tips_data('获取用户信息失败,错误码:' . $res['errcode'], __FILE__, __LINE__));
}
Log::info('查询出来的用户信息:',$res);;
查询出来的external_userid完全一致,获取的用户信息也是一模一样的
你好,能否提供具体的案例先看下,corpid openkfid 用户进线的时间点 msgid 时间戳 这些看下