diff --git a/app/core/wecomclient.py b/app/core/wecomclient.py index fad40cb..932cdc4 100644 --- a/app/core/wecomclient.py +++ b/app/core/wecomclient.py @@ -74,11 +74,11 @@ class WecomClient: async def unionid_to_external_userid(self, unionid: str, openid: str) -> Optional[str]: """根据unionid获取external_userid""" try: - url = f"https://qyapi.weixin.qq.com/cgi-bin/idconvert/unionid_to_external_userid?access_token={await self.get_access_token()}" + url = f"https://qyapi.weixin.qq.com/cgi-bin/corpgroup/unionid_to_external_userid?access_token={await self.get_access_token()}" params = { "unionid": unionid, "openid": openid, - "subject_type": 1 + "corpid": self.corp_id } async with aiohttp.ClientSession() as session: