lark
lark copied to clipboard
Support for GetUserIDByEmail
trafficstars
I believe this should be implemented in api-contact.go due to the current GetUserInfo only supporting open_id, union_id, and user_id, and not having support for search by email.
// GetUserIDByEmail fetches a user's information by their email using the batch_get_id endpoint
func (bot Bot) GetUserIDByEmail(email string) (*BatchGetIDByEmailResponse, error) {
params := map[string]interface{}{
"emails": []string{email},
}
var respData BatchGetIDByEmailResponse
err := bot.PostAPIRequest("GetUserIDByEmail", batchGetIDByEmailURL, true, params, &respData)
return &respData, err
}
GetUserIDByEmail
Do you mean api_user.go of in-house version?