本文不是完全从头一步一步获取的,是正常系统运行过程中为了核对管理信息使用的方法
1、获取企业AccessToken
https://qyapi.weixin.qq.com/cgi-bin/service/get_corp_token?suite_access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{ "auth_corpid": "wxxxxxxxxxxxxxxxxxx", "permanent_code": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }
//SuitAccessToken是企业微信定时推送给第三方服务商的
//auth_corpid是授权企业的corpid
//permanent_code是授权企业的永久授权码
2、获取管理员信息
https://qyapi.weixin.qq.com/cgi-bin/service/get_admin_list?suite_access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{ "auth_corpid": "wxxxxxxxxxxxxxxxxxx", "agentid": xxxxxx }
//agentid是客户的agentid