From ead8a6fadbc0edf49deb66713068d6af67feff4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E6=99=B6?= Date: Sun, 24 Sep 2023 10:46:38 +0800 Subject: [PATCH] fix(work): fix UserGet api error userid not found (#723) fix UserGet api error userid not found --- work/addresslist/user.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/work/addresslist/user.go b/work/addresslist/user.go index 0788eca..07cc8f5 100644 --- a/work/addresslist/user.go +++ b/work/addresslist/user.go @@ -221,7 +221,7 @@ type UserGetResponse struct { } `json:"external_profile"` // 成员对外属性,字段详情见对外属性;代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段 } -// UserGet 获取部门成员 +// UserGet 读取成员 // @see https://developer.work.weixin.qq.com/document/path/90196 func (r *Client) UserGet(UserID string) (*UserGetResponse, error) { var ( @@ -237,8 +237,8 @@ func (r *Client) UserGet(UserID string) (*UserGetResponse, error) { strings.Join([]string{ userGetURL, util.Query(map[string]interface{}{ - "access_token": accessToken, - "department_id": UserID, + "access_token": accessToken, + "userid": UserID, }), }, "?")); err != nil { return nil, err