Documentation
¶
Overview ¶
*
- 企业微信处理(发消息,服务于报警)
Index ¶
- func AGGetDetail(api *token.Api)
- func AGGetList(api *token.Api) ([]structs.AgentBase, error)
- func AuthGetInfoByTicket(api *token.Api, ticket string) (*structs.UserInfo, error)
- func AuthGetInfoWithCode(api *token.Api, code string) (*structs.UserInfoWithCode, error)
- func CustomerAcquisitionCreate(corp *token.Api, req *structs.CustomerAcquisition) (*structs.CustomerAcquisitionLink, error)
- func CustomerAcquisitionCustomerList(corp *token.Api, req *structs.CustomerAcquisitionSearch) (*structs.CustomerAcquisitionCustomerList, error)
- func CustomerAcquisitionDelete(corp *token.Api, linkId string) error
- func CustomerAcquisitionDetail(corp *token.Api, linkId string) (*structs.CustomerAcquisitionInfo, error)
- func CustomerAcquisitionList(corp *token.Api, req *structs.CustomerAcquisitionSearch) (*structs.CustomerAcquisitionResult, error)
- func CustomerAcquisitionQuota(corp *token.Api) (*structs.CustomerAcquisitionQuotaList, error)
- func CustomerAcquisitionStatistic(corp *token.Api, req *structs.CustomerAcquisitionStatisticSearch) (*structs.CustomerAcquisitionStatisticResult, error)
- func CustomerAcquisitionUpdate(corp *token.Api, req *structs.CustomerAcquisitionInfo) error
- func DepartCreate(api *token.Api, dep *structs.Department) (int64, error)
- func DepartCreateV2(api *token.Api, dep any) (int64, error)
- func DepartDelete(api *token.Api, departId string) error
- func DepartGetDetail(api *token.Api, id string) (*structs.Department, error)
- func DepartGetList(api *token.Api, id string) ([]structs.Department, error)
- func DepartGetSimpleList(api *token.Api, id string) ([]structs.Department, error)
- func DepartUpdate(api *token.Api, dep *structs.Department) error
- func DepartUpdateV2(api *token.Api, dep any) error
- func ExportDepartment(api *token.Api, req *structs.Export) (string, error)
- func ExportResult(api *token.Api, jobId string) (*structs.ExportResult, error)
- func ExportSimpleUser(api *token.Api, req *structs.Export) (string, error)
- func ExportTagUser(api *token.Api, req *structs.Export, tagId int) (string, error)
- func ExportUserDetail(api *token.Api, req *structs.Export) (string, error)
- func ExtContactAddContactWay(corp *token.Api, req any) (*structs.AddContactWayResult, error)
- func ExtContactAddMomentTask(corp *token.Api, req *structs.AddMomentTask) (string, error)
- func ExtContactAddStrategyTag(corp *token.Api, tag *structs.ExternalContactAddStrategyTagReq) (*structs.ExternalContactTagGroup, error)
- func ExtContactAddTag(corp *token.Api, req *structs.ExternalContactAddTagReq) ([]structs.ExternalContactTagGroup, error)
- func ExtContactBatchDetail(corp *token.Api, batch *structs.BatchUserId) ([]structs.ExternalContactDetail, string, error)
- func ExtContactCancelGroupMsgSend(corp *token.Api, msgId string) error
- func ExtContactCancelMomentTask(corp *token.Api, momentId string) error
- func ExtContactCloseTempChat(corp *token.Api, userid, externalUserId string) error
- func ExtContactDeleteContactWay(corp *token.Api, configId string) error
- func ExtContactDeleteStrategyTag(corp *token.Api, tag *structs.ExternalContactTagId) error
- func ExtContactDeleteTag(corp *token.Api, tags *structs.ExternalContactTagId, agentId string) error
- func ExtContactEditStrategyTag(corp *token.Api, tag *structs.ExternalContactEditTagReq) error
- func ExtContactEditTag(corp *token.Api, req *structs.ExternalContactEditTagReq) error
- func ExtContactFollowUserList(corp *token.Api) ([]string, error)
- func ExtContactGetContactWay(corp *token.Api, configId string) (*structs.ContactWay, error)
- func ExtContactGetDetail(corp *token.Api, externalUserid string, cursor string) (*structs.ExternalContactDetail, string, error)
- func ExtContactGetGroupChatStatistic(corp *token.Api, req *structs.GroupChatStatisticReq) (*structs.GroupChatStatisticResult, error)
- func ExtContactGetGroupMsgList(corp *token.Api, req *structs.GroupMsgReq) ([]structs.GroupMsg, string, error)
- func ExtContactGetGroupMsgTask(corp *token.Api, req *structs.GroupMsgSearch) ([]structs.GroupMsgTask, string, error)
- func ExtContactGetList(corp *token.Api, userid string) ([]string, error)
- func ExtContactGetMomentList(corp *token.Api, req structs.MomentListReq) (*structs.MomentListResp, error)
- func ExtContactGetMomentTaskResult(corp *token.Api, jobId string) (*structs.MomentTaskResult, error)
- func ExtContactGetTagList(corp *token.Api, tags []string, groups []string) ([]structs.ExternalContactTagGroup, error)
- func ExtContactGetUserBehaviorData(corp *token.Api, req *structs.UserBehaviorDataReq) ([]structs.BehaviorDataResult, error)
- func ExtContactGroupDetail(corp *token.Api, chatId string, needName int) (*structs.GroupChatDetail, error)
- func ExtContactGroupList(corp *token.Api, req *structs.ExternalGroupListReq) ([]structs.GroupChat, string, error)
- func ExtContactGroupMsgCreate(corp *token.Api, req *structs.ExGroupMsg) (*structs.ExGroupMsgResult, error)
- func ExtContactGroupMsgSendResult(corp *token.Api, req *structs.GroupMsgSearch) ([]structs.GroupMsgSendResult, string, error)
- func ExtContactGroupOnJobTransfer(corp *token.Api, req *structs.GroupTransfer) ([]structs.GroupTransferResult, error)
- func ExtContactGroupTransfer(corp *token.Api, req *structs.GroupTransfer) ([]structs.GroupTransferResult, error)
- func ExtContactListContactWay(corp *token.Api, req *structs.CursorSearchReq) ([]structs.WayItem, string, error)
- func ExtContactMarkTag(corp *token.Api, tags *structs.ExternalContactMarkTagReq) error
- func ExtContactRemark(corp *token.Api, remark *structs.ExternalRemark) error
- func ExtContactRemindGroupMsgSend(corp *token.Api, msgId string) error
- func ExtContactStrategyTagList(corp *token.Api, tags *structs.ExternalContactTagId, strategyId string) ([]structs.ExternalContactTagGroup, error)
- func ExtContactTransferCustomer(corp *token.Api, req *structs.TransferCustomer) ([]structs.TransferCustomerResult, error)
- func ExtContactUpdateContactWay(corp *token.Api, req any) error
- func GetAccessToken(tk token.Token, d data.D) (access.Token, error)
- func GetCorpService() token.Service
- func GetJoinQrcode(api *token.Api, sizeType int) (string, error)
- func GetMsgAuditService() token.Service
- func GetProviderService() token.Service
- func GetService() token.Service
- func GetSuiteService() token.Service
- func GetTicket(api *token.Api, d data.D) (*token.Ticket, error)
- func IDBatchUserIdFromService(corp *token.Api, openUseridList []string, sourceAgentId int) (*structs.UserIdResult, error)
- func IDBatchUserIdToService(api *token.Api, user *structs.UserIdReq) (*structs.OpenUserId, error)
- func IDCApplyMassCallTicket(api *token.Api, req structs.ExtToPendingId) (string, error)
- func IDCExternalUserIdToPendingId(api *token.Api, req structs.ExtToPendingId) ([]structs.ExtToPendingIdResult, error)
- func IDCKfId(api *token.Api, id []string) (*structs.KFIDResult, error)
- func IDCTagId(api *token.Api, tagId []string) (*structs.ExternalTagIDResult, error)
- func IDCTmpExternalUserId(api *token.Api, req structs.TmpExternalUser) (*structs.TmpExternalUserResult, error)
- func IDCUnionIdToExternalUserId(api *token.Api, req structs.UnionIdTo) (*structs.UnionIdToResult, error)
- func IDExternalUserIdFromService(corp *token.Api, externalUserid string, sourceAgentId int) (*structs.NewExternalUserid, error)
- func IDExternalUserIdToService(corp *token.Api, externalUserid string) (string, error)
- func IDGroupNewExternalUserIdToService(corp *token.Api, chatId string, externalUseridList []string) ([]structs.NewExternalUserid, error)
- func IDNewExternalUserIdToService(corp *token.Api, externalUseridList []string) ([]structs.NewExternalUserid, error)
- func IDOpenGroupIdToChatId(corp *token.Api, openGroupId string) (string, error)
- func IDUnionIdToExternalUserId3rd(corp *token.Api, unionId, openId string) ([]structs.ExternalUserIdInfo, error)
- func IDUnionIdToExternalUserid(corp *token.Api, unionId, openId string) (string, error)
- func ImportBatchReplaceDepart(api *token.Api, req *structs.ImportReq) (string, error)
- func ImportBatchReplaceUser(api *token.Api, req *structs.ImportReq) (string, error)
- func ImportBatchResult(api *token.Api, jobId string) (*structs.ImportResult, error)
- func ImportBatchSYncUser(api *token.Api, req *structs.ImportReq) (string, error)
- func IsTokenExpired(code int32) bool
- func JSApiGetAgentTicket(api *token.Api) (structs.Ticket, error)
- func JSApiGetCorpTicket(api *token.Api) (structs.Ticket, error)
- func MACheckRoomAgree(api *token.Api, roomId string) ([]structs.AgreeInfo, error)
- func MACheckSingleAgree(api *token.Api, agrees []structs.SingleAgree) ([]structs.AgreeInfo, error)
- func MAGetGroupChat(api *token.Api, roomId string) (*structs.RoomInfo, error)
- func MAGetPermitUserList(api *token.Api, ty int) ([]string, error)
- func MigrateToCustomizedApp(api *token.Api, suiteAccessToken string) error
- func NewCorpToken(app token.App) token.Token
- func NewMessage(toWho structs.ToWho, msgType string, msg interface{}) structs.Message
- func NewMsgAuditToken(app token.App) token.Token
- func NewProviderToken(app token.App) token.Token
- func NewSuiteToken(app token.App) token.Token
- func NewToken(app token.App) token.Token
- func Notify(option *config.Options, content interface{}, call FillContentCallback) error
- func ProviderTokenUrl(acsKey string, uri string) string
- func SendMessage(api *token.Api, msg structs.Message) error
- func SuiteTokenUrl(acsKey string, uri string) string
- func TAGAddUser(api *token.Api, tag *structs.UserTag) error
- func TAGCreate(api *token.Api, tag *structs.Tag) (int64, error)
- func TAGDelete(api *token.Api, tagId int64) error
- func TAGDeleteUser(api *token.Api, tag *structs.UserTag) error
- func TAGGetList(api *token.Api) ([]structs.Tag, error)
- func TAGUpdate(api *token.Api, tag *structs.Tag) error
- func TAGUser(api *token.Api, tagId int64) (*structs.UserTag, error)
- func UserBatchDelete(api *token.Api, userid []string) error
- func UserCheckMemberAuth(api *token.Api, openUserId string) (bool, error)
- func UserCreate(api *token.Api, user *structs.CreateUpdateDepMember) error
- func UserCreateV2(api *token.Api, user interface{}) error
- func UserDelete(api *token.Api, userid string) error
- func UserGetByEmail(api *token.Api, email string, emailType int) (string, error)
- func UserGetByMobile(api *token.Api, mobile string) (string, error)
- func UserGetByUserId(api *token.Api, userid string) (*structs.DepMember, error)
- func UserGetDetailByDepartId(api *token.Api, departId string) ([]structs.DepMember, error)
- func UserGetListId(api *token.Api, cursor string, limit int) ([]structs.DepUser, string, error)
- func UserGetSimpleByDepartId(api *token.Api, departId string) ([]structs.SimpleUser, error)
- func UserMemberAuthList(api *token.Api, cursor string, limit int) (*structs.MemberAuthResult, error)
- func UserSelectTicket(api *token.Api, selectedTicket string) (*structs.SelectedTicketResult, error)
- func UserUpdate(api *token.Api, user *structs.CreateUpdateDepMember) error
- func UserUpdateV2(api *token.Api, user any) error
- func UserUserId2OpenId(api *token.Api, userid string) (string, error)
- type FillContentCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AGGetDetail ¶ added in v1.0.23
AGGetDetail 获取指定的应用详情 对于互联企业的应用,如果需要获取应用可见范围内其他互联企业的部门与成员,请调用互联企业-获取应用可见范围接口 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/agent/get?access_token=ACCESS_TOKEN&agentid=AGENTID
func AGGetList ¶ added in v1.0.23
AGGetList 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/agent/list?access_token=ACCESS_TOKEN
func AuthGetInfoByTicket ¶ added in v1.8.4
AuthGetInfoByTicket 获取访问用户敏感信息 自建应用与代开发应用可通过该接口获取成员授权的敏感字段 对于自建应用与代开发应用,敏感字段需要管理员在应用详情里选择,且成员oauth2授权时确认后才返回。 敏感字段包括:性别、头像、员工个人二维码、手机、邮箱、企业邮箱、地址。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/auth/getuserdetail?access_token=ACCESS_TOKEN
func AuthGetInfoWithCode ¶ added in v1.8.4
AuthGetInfoWithCode 获取访问用户身份 该接口用于根据code获取成员信息 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo?access_token=ACCESS_TOKEN&code=CODE
func CustomerAcquisitionCreate ¶ added in v1.8.24
func CustomerAcquisitionCreate(corp *token.Api, req *structs.CustomerAcquisition) (*structs.CustomerAcquisitionLink, error)
CustomerAcquisitionCreate 创建获客链接 企业可通过此接口创建新的获客链接。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition/create_link?access_token=ACCESS_TOKEN
func CustomerAcquisitionCustomerList ¶ added in v1.8.24
func CustomerAcquisitionCustomerList(corp *token.Api, req *structs.CustomerAcquisitionSearch) (*structs.CustomerAcquisitionCustomerList, error)
CustomerAcquisitionCustomerList 获取获客客户列表 企业可通过此接口获取到由指定的获客链接添加的客户列表。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition/customer?access_token=ACCESS_TOKEN
func CustomerAcquisitionDelete ¶ added in v1.8.24
CustomerAcquisitionDelete 删除获客链接 企业可通过此接口删除获客链接,删除后的获客链接将无法继续使用。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition/delete_link?access_token=ACCESS_TOKEN
func CustomerAcquisitionDetail ¶ added in v1.8.24
func CustomerAcquisitionDetail(corp *token.Api, linkId string) (*structs.CustomerAcquisitionInfo, error)
CustomerAcquisitionDetail 获取获客链接详情 企业可通过此接口根据获客链接id获取链接配置详情。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition/get?access_token=ACCESS_TOKEN
func CustomerAcquisitionList ¶ added in v1.8.24
func CustomerAcquisitionList(corp *token.Api, req *structs.CustomerAcquisitionSearch) (*structs.CustomerAcquisitionResult, error)
CustomerAcquisitionList 获取获客链接列表 企业可通过此接口获取当前仍然有效的获客链接。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition/list_link?access_token=ACCESS_TOKEN
func CustomerAcquisitionQuota ¶ added in v1.8.24
func CustomerAcquisitionQuota(corp *token.Api) (*structs.CustomerAcquisitionQuotaList, error)
CustomerAcquisitionQuota 查询剩余使用量 企业可通过此接口查询当前剩余的使用量。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition_quota?access_token=ACCESS_TOKEN
func CustomerAcquisitionStatistic ¶ added in v1.8.24
func CustomerAcquisitionStatistic(corp *token.Api, req *structs.CustomerAcquisitionStatisticSearch) (*structs.CustomerAcquisitionStatisticResult, error)
CustomerAcquisitionStatistic 查询链接使用详情 企业可通过此接口查询指定获客链接在指定时间范围内的访问情况。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition/statistic?access_token=ACCESS_TOKEN
func CustomerAcquisitionUpdate ¶ added in v1.8.24
func CustomerAcquisitionUpdate(corp *token.Api, req *structs.CustomerAcquisitionInfo) error
CustomerAcquisitionUpdate 编辑获客链接 企业可通过此接口编辑获客链接,修改获客链接的关联范围或修改获客链接的名称。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition/update_link?access_token=ACCESS_TOKEN
func DepartCreate ¶ added in v1.8.4
DepartCreate 创建部门 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/department/create?access_token=ACCESS_TOKEN
func DepartCreateV2 ¶ added in v1.8.29
DepartCreateV2 创建部门 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/department/create?access_token=ACCESS_TOKEN
func DepartDelete ¶ added in v1.8.4
DepartDelete 删除部门 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/department/delete?access_token=ACCESS_TOKEN&id=ID
func DepartGetDetail ¶ added in v1.8.4
DepartGetDetail 获取单个部门详情 企业通讯录安全特别重要,企业微信将持续升级加固通讯录接口的安全机制,以下是关键的变更点: 【重要】从2022年8月15日10点开始,“企业管理后台 - 管理工具 - 通讯录同步”的新增IP将不能再调用此接口,企业可通过「获取部门ID列表」接口获取部门ID列表。查看调整详情。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/department/get?access_token=ACCESS_TOKEN&id=ID
func DepartGetList ¶ added in v1.8.4
DepartGetList 获取部门列表 企业通讯录安全特别重要,企业微信将持续升级加固通讯录接口的安全机制,以下是关键的变更点: 【重要】从2022年8月15日10点开始,“企业管理后台 - 管理工具 - 通讯录同步”的新增IP将不能再调用此接口,企业可通过「获取部门ID列表」接口获取部门ID列表。查看调整详情。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/department/list?access_token=ACCESS_TOKEN&id=ID
func DepartGetSimpleList ¶ added in v1.8.4
DepartGetSimpleList 获取子部门ID列表 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/department/simplelist?access_token=ACCESS_TOKEN&id=ID
func DepartUpdate ¶ added in v1.8.4
func DepartUpdate(api *token.Api, dep *structs.Department) error
DepartUpdate 更新部门 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/department/update?access_token=ACCESS_TOKEN
func DepartUpdateV2 ¶ added in v1.8.29
DepartUpdateV2 更新部门 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/department/update?access_token=ACCESS_TOKEN
func ExportDepartment ¶ added in v1.8.4
ExportDepartment 导出部门 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/export/user?access_token=ACCESS_TOKEN
func ExportResult ¶ added in v1.8.4
func ExportSimpleUser ¶ added in v1.8.4
ExportSimpleUser 导出成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/export/simple_user?access_token=ACCESS_TOKEN
func ExportTagUser ¶ added in v1.8.4
ExportTagUser 导出标签成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/export/taguser?access_token=ACCESS_TOKEN
func ExportUserDetail ¶ added in v1.8.4
ExportUserDetail 导出成员详情 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/export/user?access_token=ACCESS_TOKEN
func ExtContactAddContactWay ¶ added in v1.8.31
ExtContactAddContactWay 配置客户联系「联系我」方式 调用相关接口应满足如下的权限要求: 权限 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 使用人员需要配置了客户联系功能。 第三方调用时,应用需具有“企业客户权限->客户联系->配置「联系我」二维码”权限。 第三方/自建应用调用时,传入的userid和partyid需要在此应用的可见范围内。 配置的使用成员必须在企业微信激活且已经过实名认证。 临时会话的二维码具有有效期,添加企业成员后仅能在指定有效期内进行会话,仅支持医疗行业企业创建。 临时会话模式可以配置会话结束时自动发送给用户的结束语。
企业可以在管理后台-客户联系-加客户中配置成员的「联系我」的二维码或者小程序按钮,客户通过扫描二维码或点击小程序上的按钮,即可获取成员联系方式,主动联系到成员。 企业可通过此接口为具有客户联系功能的成员生成专属的「联系我」二维码或者「联系我」按钮。 如果配置的是「联系我」按钮,需要开发者的小程序接入小程序插件。
注意: 通过API添加的「联系我」不会在管理端进行展示,每个企业可通过API最多配置50万个「联系我」。 用户需要妥善存储返回的config_id,config_id丢失可能导致用户无法编辑或删除「联系我」。 临时会话模式不占用「联系我」数量,但每日最多添加10万个,并且仅支持单人。 临时会话模式的二维码,添加好友完成后该二维码即刻失效。
请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_contact_way?access_token=ACCESS_TOKEN req *structs.AddContactWay
func ExtContactAddMomentTask ¶ added in v1.8.4
ExtContactAddMomentTask 企业和第三方应用可通过该接口创建客户朋友圈的发表任务 企业可通过此接口,根据外部联系人的userid(如何获取?),拉取客户详情。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_moment_task?access_token=ACCESS_TOKEN
func ExtContactAddStrategyTag ¶ added in v1.8.4
func ExtContactAddStrategyTag(corp *token.Api, tag *structs.ExternalContactAddStrategyTagReq) (*structs.ExternalContactTagGroup, error)
ExtContactAddStrategyTag 为指定规则组创建企业客户标签 企业可通过此接口向规则组中添加新的标签组和标签,每个企业的企业标签和规则组标签合计最多可配置3000个。注意,仅可在一级规则组下添加标签。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_strategy_tag?access_token=ACCESS_TOKEN
func ExtContactAddTag ¶ added in v1.8.4
func ExtContactAddTag(corp *token.Api, req *structs.ExternalContactAddTagReq) ([]structs.ExternalContactTagGroup, error)
ExtContactAddTag 添加企业客户标签 企业可通过此接口向客户标签库中添加新的标签组和标签,每个企业最多可配置3000个企业标签。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_corp_tag?access_token=ACCESS_TOKEN
func ExtContactBatchDetail ¶ added in v1.8.4
func ExtContactBatchDetail(corp *token.Api, batch *structs.BatchUserId) ([]structs.ExternalContactDetail, string, error)
ExtContactBatchDetail 批量获取客户详情 企业/第三方可通过此接口获取指定成员添加的客户信息列表。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/batch/get_by_user?access_token=ACCESS_TOKEN
func ExtContactCancelGroupMsgSend ¶ added in v1.8.24
ExtContactCancelGroupMsgSend 停止企业群发 最后更新:2022/11/30 企业和第三方应用可调用此接口,停止无需成员继续发送的企业群发 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/cancel_groupmsg_send?access_token=ACCESS_TOKEN
func ExtContactCancelMomentTask ¶ added in v1.8.4
ExtContactCancelMomentTask 停止发表企业朋友圈
func ExtContactCloseTempChat ¶ added in v1.8.31
ExtContactCloseTempChat 结束临时会话 将指定的企业成员和客户之前的临时会话断开,断开前会自动下发已配置的结束语。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/close_temp_chat?access_token=ACCESS_TOKEN
func ExtContactDeleteContactWay ¶ added in v1.8.31
ExtContactDeleteContactWay 删除企业已配置的「联系我」方式 删除一个已配置的「联系我」二维码或者「联系我」小程序按钮。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/del_contact_way?access_token=ACCESS_TOKEN
func ExtContactDeleteStrategyTag ¶ added in v1.8.4
func ExtContactDeleteStrategyTag(corp *token.Api, tag *structs.ExternalContactTagId) error
ExtContactDeleteStrategyTag 删除指定规则组下的企业客户标签 企业可通过此接口删除某个规则组下的标签,或删除整个标签组。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/del_strategy_tag?access_token=ACCESS_TOKEN
func ExtContactDeleteTag ¶ added in v1.8.4
ExtContactDeleteTag 删除企业客户标签 企业可通过此接口删除客户标签库中的标签,或删除整个标签组。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/del_corp_tag?access_token=ACCESS_TOKEN
func ExtContactEditStrategyTag ¶ added in v1.8.4
func ExtContactEditStrategyTag(corp *token.Api, tag *structs.ExternalContactEditTagReq) error
ExtContactEditStrategyTag 编辑指定规则组下的企业客户标签 企业可通过此接口编辑指定规则组下的客户标签/标签组的名称或次序值,但不可重新指定标签/标签组所属规则组。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/edit_strategy_tag?access_token=ACCESS_TOKEN
func ExtContactEditTag ¶ added in v1.8.4
func ExtContactEditTag(corp *token.Api, req *structs.ExternalContactEditTagReq) error
ExtContactEditTag 编辑企业客户标签 企业可通过此接口编辑客户标签/标签组的名称或次序值。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/edit_corp_tag?access_token=ACCESS_TOKEN
func ExtContactFollowUserList ¶ added in v1.8.4
ExtContactFollowUserList 获取配置了客户联系功能的成员列表 企业和第三方服务商可通过此接口获取配置了客户联系功能的成员列表。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_follow_user_list?access_token=ACCESS_TOKEN
func ExtContactGetContactWay ¶ added in v1.8.31
ExtContactGetContactWay 获取企业已配置的「联系我」方式 获取企业配置的「联系我」二维码和「联系我」小程序按钮。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_contact_way?access_token=ACCESS_TOKEN
func ExtContactGetDetail ¶ added in v1.8.6
func ExtContactGetDetail(corp *token.Api, externalUserid string, cursor string) (*structs.ExternalContactDetail, string, error)
ExtContactGetDetail 获取客户详情 企业可通过此接口,根据外部联系人的userid(如何获取?),拉取客户详情。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get?access_token=ACCESS_TOKEN&external_userid=EXTERNAL_USERID&cursor=CURSOR
func ExtContactGetGroupChatStatistic ¶ added in v1.8.23
func ExtContactGetGroupChatStatistic(corp *token.Api, req *structs.GroupChatStatisticReq) (*structs.GroupChatStatisticResult, error)
ExtContactGetGroupChatStatistic 获取「群聊数据统计」数据 最后更新:2021/07/29 获取指定日期的统计数据。注意,企业微信仅存储180天的数据。 按群主聚合的方式 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/statistic?access_token=ACCESS_TOKEN
func ExtContactGetGroupMsgList ¶ added in v1.8.4
func ExtContactGetGroupMsgList(corp *token.Api, req *structs.GroupMsgReq) ([]structs.GroupMsg, string, error)
ExtContactGetGroupMsgList 获取群发记录列表 企业和第三方应用可通过此接口获取企业与成员的群发记录。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_groupmsg_list_v2?access_token=ACCESS_TOKEN
func ExtContactGetGroupMsgTask ¶ added in v1.8.24
func ExtContactGetGroupMsgTask(corp *token.Api, req *structs.GroupMsgSearch) ([]structs.GroupMsgTask, string, error)
ExtContactGetGroupMsgTask 获取群发成员发送任务列表 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_groupmsg_task?access_token=ACCESS_TOKEN
func ExtContactGetList ¶ added in v1.8.4
ExtContactGetList 获取外部联系人列表 企业可通过此接口获取指定成员添加的客户列表。客户是指配置了客户联系功能的成员所添加的外部联系人。
func ExtContactGetMomentList ¶ added in v1.8.4
func ExtContactGetMomentList(corp *token.Api, req structs.MomentListReq) (*structs.MomentListResp, error)
ExtContactGetMomentList 获取企业全部的发表列表
func ExtContactGetMomentTaskResult ¶ added in v1.8.4
func ExtContactGetMomentTaskResult(corp *token.Api, jobId string) (*structs.MomentTaskResult, error)
ExtContactGetMomentTaskResult 获取任务创建结果 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_moment_task_result?access_token=ACCESS_TOKEN
func ExtContactGetTagList ¶ added in v1.8.4
func ExtContactGetTagList(corp *token.Api, tags []string, groups []string) ([]structs.ExternalContactTagGroup, error)
ExtContactGetTagList 获取企业标签库 企业可通过此接口获取企业客户标签详情。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_corp_tag_list?access_token=ACCESS_TOKEN
func ExtContactGetUserBehaviorData ¶ added in v1.8.23
func ExtContactGetUserBehaviorData(corp *token.Api, req *structs.UserBehaviorDataReq) ([]structs.BehaviorDataResult, error)
ExtContactGetUserBehaviorData 获取「联系客户统计」数据 最后更新:2020/12/16 企业可通过此接口获取成员联系客户的数据,包括发起申请数、新增客户数、聊天数、发送消息数和删除/拉黑成员的客户数等指标。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_user_behavior_data?access_token=ACCESS_TOKEN
func ExtContactGroupDetail ¶ added in v1.8.4
func ExtContactGroupDetail(corp *token.Api, chatId string, needName int) (*structs.GroupChatDetail, error)
ExtContactGroupDetail 获取客户群详情 通过客户群ID,获取详情。包括群名、群成员列表、群成员入群时间、入群方式。(客户群是由具有客户群使用权限的成员创建的外部群) 需注意的是,如果发生群信息变动,会立即收到群变更事件,但是部分信息是异步处理,可能需要等一段时间调此接口才能得到最新结果 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/get?access_token=ACCESS_TOKEN
func ExtContactGroupList ¶ added in v1.8.4
func ExtContactGroupList(corp *token.Api, req *structs.ExternalGroupListReq) ([]structs.GroupChat, string, error)
ExtContactGroupList 获取客户群列表 该接口用于获取配置过客户群管理的客户群列表。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/list?access_token=ACCESS_TOKEN
func ExtContactGroupMsgCreate ¶ added in v1.8.24
func ExtContactGroupMsgCreate(corp *token.Api, req *structs.ExGroupMsg) (*structs.ExGroupMsgResult, error)
ExtContactGroupMsgCreate 添加企业群发 企业可通过此接口添加企业群发消息的模板并通知客服人员发送给相关客户。(注:企业微信终端需升级到2.7.5版本及以上) 注意:调用该接口并不会直接发送消息给客户,需要相关的客服人员操作以后才会实际发送(客服人员的企业微信需要升级到2.7.5及以上版本) 同一个企业对一个客户一个自然周内(周一至周日)至多只能发送一条消息,超过限制的用户将会被忽略。
func ExtContactGroupMsgSendResult ¶ added in v1.8.24
func ExtContactGroupMsgSendResult(corp *token.Api, req *structs.GroupMsgSearch) ([]structs.GroupMsgSendResult, string, error)
ExtContactGroupMsgSendResult 获取企业群发成员执行结果 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_groupmsg_send_result?access_token=ACCESS_TOKEN
func ExtContactGroupOnJobTransfer ¶ added in v1.8.24
func ExtContactGroupOnJobTransfer(corp *token.Api, req *structs.GroupTransfer) ([]structs.GroupTransferResult, error)
ExtContactGroupOnJobTransfer 分配在职成员的客户群 最后更新:2022/05/06 企业可通过此接口,将在职成员为群主的群,分配给另一个客服成员。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/onjob_transfer?access_token=ACCESS_TOKEN
func ExtContactGroupTransfer ¶ added in v1.8.24
func ExtContactGroupTransfer(corp *token.Api, req *structs.GroupTransfer) ([]structs.GroupTransferResult, error)
ExtContactGroupTransfer 分配离职成员的客户群 最后更新:2020/12/16 企业可通过此接口,将已离职成员为群主的群,分配给另一个客服成员。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/transfer?access_token=ACCESS_TOKEN
func ExtContactListContactWay ¶ added in v1.8.31
func ExtContactListContactWay(corp *token.Api, req *structs.CursorSearchReq) ([]structs.WayItem, string, error)
ExtContactListContactWay 获取企业已配置的「联系我」列表 获取企业配置的「联系我」二维码和「联系我」小程序插件列表。不包含临时会话。 注意,该接口仅可获取2021年7月10日以后创建的「联系我」 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/list_contact_way?access_token=ACCESS_TOKEN
func ExtContactMarkTag ¶ added in v1.8.4
func ExtContactMarkTag(corp *token.Api, tags *structs.ExternalContactMarkTagReq) error
ExtContactMarkTag 编辑客户企业标签 企业可通过此接口为指定成员的客户添加上由企业统一配置的标签。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/mark_tag?access_token=ACCESS_TOKEN
func ExtContactRemark ¶ added in v1.8.4
func ExtContactRemark(corp *token.Api, remark *structs.ExternalRemark) error
ExtContactRemark 修改客户备注信息 企业可通过此接口修改指定用户添加的客户的备注信息。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/remark?access_token=ACCESS_TOKEN
func ExtContactRemindGroupMsgSend ¶ added in v1.8.24
ExtContactRemindGroupMsgSend 提醒成员群发 最后更新:2022/11/30 企业和第三方应用可调用此接口,重新触发群发通知,提醒成员完成群发任务,24小时内每个群发最多触发三次提醒。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/remind_groupmsg_send?access_token=ACCESS_TOKEN
func ExtContactStrategyTagList ¶ added in v1.8.4
func ExtContactStrategyTagList(corp *token.Api, tags *structs.ExternalContactTagId, strategyId string) ([]structs.ExternalContactTagGroup, error)
ExtContactStrategyTagList 获取指定规则组下的企业客户标签 企业可通过此接口获取某个规则组内的企业客户标签详情。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_strategy_tag_list?access_token=ACCESS_TOKEN
func ExtContactTransferCustomer ¶ added in v1.8.24
func ExtContactTransferCustomer(corp *token.Api, req *structs.TransferCustomer) ([]structs.TransferCustomerResult, error)
ExtContactTransferCustomer 分配在职成员的客户 最后更新:2022/08/31 企业可通过此接口,转接在职成员的客户给其他成员。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/transfer_customer?access_token=ACCESS_TOKEN
func ExtContactUpdateContactWay ¶ added in v1.8.31
ExtContactUpdateContactWay 更新企业已配置的「联系我」方式 更新企业配置的「联系我」二维码和「联系我」小程序按钮中的信息,如使用人员和备注等。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/update_contact_way?access_token=ACCESS_TOKEN req *structs.UpdateContactWay
func GetCorpService ¶ added in v1.0.28
func GetJoinQrcode ¶ added in v1.0.49
GetJoinQrcode 获取加入企业二维码 支持企业用户获取实时成员加入二维码。 size_type 否 qrcode尺寸类型,1: 171 x 171; 2: 399 x 399; 3: 741 x 741; 4: 2052 x 2052 请求方式:GET(HTTPS) 请求地址: https://qyapi.weixin.qq.com/cgi-bin/corp/get_join_qrcode?access_token=ACCESS_TOKEN&size_type=SIZE_TYPE
func GetMsgAuditService ¶ added in v1.0.54
func GetProviderService ¶ added in v1.0.28
func GetService ¶ added in v1.0.28
func GetSuiteService ¶ added in v1.0.28
func IDBatchUserIdFromService ¶ added in v1.8.63
func IDBatchUserIdFromService(corp *token.Api, openUseridList []string, sourceAgentId int) (*structs.UserIdResult, error)
IDBatchUserIdFromService userid转换 将代开发应用或第三方应用获取的密文open_userid转换为明文userid。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/batch/openuserid_to_userid?access_token=ACCESS_TOKEN
func IDBatchUserIdToService ¶ added in v1.8.63
IDBatchUserIdToService userid的转换 doc: https://developer.work.weixin.qq.com/document/path/95435 将企业主体下的明文userid转换为服务商主体下的密文userid。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/batch/userid_to_openuserid?access_token=ACCESS_TOKEN
func IDCApplyMassCallTicket ¶ added in v1.8.12
IDCApplyMassCallTicket 获取接口高频调用凭据 权限说明: 仅限授权三个月内的企业获取,且每个企业最多仅能获取一次 该凭据获取成功后,有效期为7天,请在7天内完成企业的初始化操作 使用该凭据可以不受业务频率限制,但是依然受到基础频率限制 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/corp/apply_mass_call_ticket?access_token=ACCESS_TOKEN
func IDCExternalUserIdToPendingId ¶ added in v1.8.12
func IDCExternalUserIdToPendingId(api *token.Api, req structs.ExtToPendingId) ([]structs.ExtToPendingIdResult, error)
IDCExternalUserIdToPendingId external_userid查询pending_id 该接口可用于当一个微信用户成为企业客户前已经使用过服务商服务(服务商侧曾经调用过unionid转换为第三方external_userid)的场景。 本接口获取到的pending_id可以维持unionid和external_userid的关联关系。 pending_id有效期为90天,超过有效期之后,将无法通过该接口将external_userid换取对应的pending_id。 仅认证企业可调用 该客户的跟进人或其所在客户群群主必须在应用的可见范围之内 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/idconvert/batch/external_userid_to_pending_id?access_token=ACCESS_TOKEN
func IDCKfId ¶ added in v1.8.12
IDCKfId 微信客服ID的转换 最后更新:2022/09/21 将企业主体下的微信客服ID转换成服务商主体下的微信客服ID。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/idconvert/open_kfid?access_token=ACCESS_TOKEN
func IDCTagId ¶ added in v1.8.12
IDCTagId 客户标签ID的转换 最后更新:2023/05/19 将企业主体下的客户标签ID(含标签组ID)转换成服务商主体下的客户标签ID。最多不超过1000个 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/idconvert/external_tagid?access_token=ACCESS_TOKEN
func IDCTmpExternalUserId ¶ added in v1.8.12
func IDCTmpExternalUserId(api *token.Api, req structs.TmpExternalUser) (*structs.TmpExternalUserResult, error)
IDCTmpExternalUserId tmp_external_userid的转换 将应用获取的外部用户临时idtmp_external_userid,转换为external_userid。
支持将以下业务类型(business_type)对应接口获取到的tmp_external_userid进行转换:
业务类型 描述 相关接口 1 会议 获取会议详情 2 收集表 收集表的统计信息查询 读取收集表答案 支持对以下用户类型(user_type)进行转换:
用户类型 描述 转换范围 1 客户 应用可见范围内,配置了客户联系功能的企业成员所添加的外部联系人 2 企业互联 共享应用配置共享范围内的成员 3 上下游 共享应用配置共享范围内的成员 4 互联企业(圈子) 管理后台配置的应用可见范围内的成员
请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/idconvert/convert_tmp_external_userid?access_token=ACCESS_TOKEN
func IDCUnionIdToExternalUserId ¶ added in v1.8.12
func IDCUnionIdToExternalUserId(api *token.Api, req structs.UnionIdTo) (*structs.UnionIdToResult, error)
IDCUnionIdToExternalUserId unionid转换为第三方external_userid 当微信用户进入服务商的小程序或公众号时,服务商可通过此接口,将微信客户的unionid转为第三方主体的external_userid,若该微信用户尚未成为企业的客户,则返回pending_id。 小程序或公众号的主体名称可以是企业的,也可以是服务商的。 该接口有调用频率限制,当subject_type为0时,按企业作如下的限制:10万次/小时、48万次/天、750万次/月;(注意这里是所有服务商共用企业额度的) 当subject_type为1时,按服务商作如下的限制:10万次/小时、48万次/天、750万次/月。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/idconvert/unionid_to_external_userid?access_token=ACCESS_TOKEN
func IDExternalUserIdFromService ¶ added in v1.8.63
func IDExternalUserIdFromService(corp *token.Api, externalUserid string, sourceAgentId int) (*structs.NewExternalUserid, error)
IDExternalUserIdFromService external_userid转换 将代开发应用或第三方应用获取的externaluserid转换成自建应用的externaluserid。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/from_service_external_userid?access_token=ACCESS_TOKEN
func IDExternalUserIdToService ¶ added in v1.8.63
IDExternalUserIdToService 代开发应用external_userid转换 企业同时授权了服务商的第三方应用与代开发应用,服务商可使用该接口将代开发应用获取到的external_userid转换为第三方应用的external_userid, 从而进行关联映射。 若代开发自建应用已升级(升级说明见 代开发应用安全性升级),则获取到的external_userid与第三方应用一致,故无须调用该接口。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/to_service_external_userid?access_token=ACCESS_TOKEN
func IDGroupNewExternalUserIdToService ¶ added in v1.8.63
func IDGroupNewExternalUserIdToService(corp *token.Api, chatId string, externalUseridList []string) ([]structs.NewExternalUserid, error)
IDGroupNewExternalUserIdToService 转换客户群成员external_userid 转换客户external_userid接口不支持客户群的场景,如果需要转换客户群中无好友关系的群成员external_userid,需要调用本接口,调用时需要传入客户群的chat_id。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/get_new_external_userid?access_token=ACCESS_TOKEN
func IDNewExternalUserIdToService ¶ added in v1.8.63
func IDNewExternalUserIdToService(corp *token.Api, externalUseridList []string) ([]structs.NewExternalUserid, error)
IDNewExternalUserIdToService external_userid的转换 https://developer.work.weixin.qq.com/document/path/95435 将企业主体下的external_userid转换为服务商主体下的external_userid。 转换客户external_userid 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_new_external_userid?access_token=ACCESS_TOKEN
func IDOpenGroupIdToChatId ¶ added in v1.8.66
IDOpenGroupIdToChatId 客户群opengid转换 用户在微信里的客户群里打开小程序时,某些场景下可以获取到群的opengid,如果该群是企业微信的客户群,则企业或第三方可以调用此接口将一个opengid转换为客户群chat_id 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/opengid_to_chatid?access_token=ACCESS_TOKEN
func IDUnionIdToExternalUserId3rd ¶ added in v1.8.63
func IDUnionIdToExternalUserId3rd(corp *token.Api, unionId, openId string) ([]structs.ExternalUserIdInfo, error)
IDUnionIdToExternalUserId3rd 第三方主体unionid转换为第三方external_userid 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/unionid_to_external_userid_3rd?suite_access_token=ACCESS_TOKEN
func IDUnionIdToExternalUserid ¶ added in v1.8.63
IDUnionIdToExternalUserid 企业主体unionid转换为第三方external_userid 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/unionid_to_external_userid?access_token=ACCESS_TOKEN
func ImportBatchReplaceDepart ¶ added in v1.8.4
ImportBatchReplaceDepart 全量覆盖部门 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/batch/replaceparty?access_token=ACCESS_TOKEN
func ImportBatchReplaceUser ¶ added in v1.8.4
ImportBatchReplaceUser 全量覆盖成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/batch/replaceuser?access_token=ACCESS_TOKEN
func ImportBatchResult ¶ added in v1.8.4
ImportBatchResult 获取异步任务结果 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/batch/getresult?access_token=ACCESS_TOKEN&jobid=JOBID
func ImportBatchSYncUser ¶ added in v1.8.4
ImportBatchSYncUser 增量更新成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/batch/syncuser?access_token=ACCESS_TOKEN
func IsTokenExpired ¶
func JSApiGetAgentTicket ¶ added in v1.8.56
JSApiGetAgentTicket 获取应用的jsapi_ticket 应用的jsapi_ticket用于计算agentConfig(参见“通过agentConfig注入应用的权限”)的签名,签名计算方法与上述介绍的config的签名算法完全相同,但需要注意以下区别:
签名的jsapi_ticket必须使用以下接口获取。且必须用wx.agentConfig中的agentid对应的应用去获取access_token。 签名用的noncestr和timestamp必须与wx.agentConfig中的nonceStr和timestamp相同。 正常情况下,应用的jsapi_ticket的有效期为7200秒,通过access_token来获取。由于获取jsapi_ticket的api调用次数非常有限(一小时内,每个应用不能超过100次),频繁刷新jsapi_ticket会导致api调用受限,影响自身业务,开发者必须在自己的服务全局缓存应用的jsapi_ticket。
请求方式:GET(HTTPS) 请求URL:https://qyapi.weixin.qq.com/cgi-bin/ticket/get?access_token=ACCESS_TOKEN&type=agent_config
func JSApiGetCorpTicket ¶ added in v1.8.56
JSApiGetCorpTicket 获取企业的jsapi_ticket 生成签名之前必须先了解一下jsapi_ticket,jsapi_ticket是H5应用调用企业微信JS接口的临时票据。正常情况下,jsapi_ticket的有效期为7200秒,通过access_token来获取。由于获取jsapi_ticket的api调用次数非常有限(一小时内,一个企业最多可获取400次,且单个应用不能超过100次),频繁刷新jsapi_ticket会导致api调用受限,影响自身业务,开发者必须在自己的服务全局缓存jsapi_ticket。
请求方式:GET(HTTPS) 请求URL:https://qyapi.weixin.qq.com/cgi-bin/get_jsapi_ticket?access_token=ACCESS_TOKEN
func MACheckRoomAgree ¶ added in v1.0.54
MACheckRoomAgree 群聊 请求地址:https://qyapi.weixin.qq.com/cgi-bin/msgaudit/check_room_agree?access_token=ACCESS_TOKEN 请求方式:POST(HTTPS)
func MACheckSingleAgree ¶ added in v1.0.54
MACheckSingleAgree 目前一次请求只支持最多100个查询条目 最后更新:2021/04/29 企业可通过下述接口,获取会话中外部成员的同意情况 单聊请求地址:https://qyapi.weixin.qq.com/cgi-bin/msgaudit/check_single_agree?access_token=ACCESS_TOKEN 请求方式:POST(HTTPS)
func MAGetGroupChat ¶ added in v1.0.54
MAGetGroupChat 获取会话内容存档内部群信息 最后更新:2021/01/07 企业可通过此接口,获取会话内容存档本企业的内部群信息,包括群名称、群主id、公告、群创建时间以及所有群成员的id与加入时间。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/msgaudit/groupchat/get?access_token=ACCESS_TOKEN
func MAGetPermitUserList ¶ added in v1.0.54
MAGetPermitUserList 获取会话内容存档开启成员列表 最后更新:2020/08/27 企业可通过此接口,获取企业开启会话内容存档的成员列表 ty: 拉取对应版本的开启成员列表。1表示办公版;2表示服务版;3表示企业版。非必填,不填写的时候返回全量成员列表。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/msgaudit/get_permit_user_list?access_token=ACCESS_TOKEN
func MigrateToCustomizedApp ¶ added in v1.0.0
MigrateToCustomizedApp 自建应用迁移成代开发自建应用 该API可以将企业的自建应用关联到服务商的代开发应用模版上,从而将自建应用转换成代开发应用。测试企业的任意自建应用均可调用该接口;若非测试企业,则仅服务商管理端“历史应用迁移”列表中的应用可调用。 请求方式:POST(HTTPS) 请求地址: https://qyapi.weixin.qq.com/cgi-bin/agent/migrate_to_customized_app?access_token=ACCESS_TOKEN
func NewMessage ¶
func Notify ¶ added in v1.8.4
func Notify(option *config.Options, content interface{}, call FillContentCallback) error
func ProviderTokenUrl ¶ added in v1.0.19
func SendMessage ¶
SendMessage 发送应用消息,群聊消息,客户欢迎语
func SuiteTokenUrl ¶ added in v1.0.19
func TAGAddUser ¶ added in v1.0.35
TAGAddUser 增加标签成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/tag/addtagusers?access_token=ACCESS_TOKEN
func TAGCreate ¶ added in v1.0.35
TAGCreate 创建标签 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/tag/create?access_token=ACCESS_TOKEN
func TAGDelete ¶ added in v1.0.35
TAGDelete 删除标签 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/tag/delete?access_token=ACCESS_TOKEN&tagid=TAGID
func TAGDeleteUser ¶ added in v1.0.35
TAGDeleteUser 删除标签成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/tag/deltagusers?access_token=ACCESS_TOKEN
func TAGGetList ¶ added in v1.0.35
TAGGetList 获取标签列表 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/tag/list?access_token=ACCESS_TOKEN
func TAGUpdate ¶ added in v1.0.35
TAGUpdate 更新标签名字 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/tag/update?access_token=ACCESS_TOKEN
func TAGUser ¶ added in v1.0.35
TAGUser 获取标签成员 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/tag/get?access_token=ACCESS_TOKEN&tagid=TAGID
func UserBatchDelete ¶ added in v1.8.4
UserBatchDelete 批量删除成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/batchdelete?access_token=ACCESS_TOKEN
func UserCheckMemberAuth ¶ added in v1.8.4
UserCheckMemberAuth 查询成员用户是否已授权 当企业当前授权模式为成员授权时,可调用该接口查询成员用户是否已授权 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/check_member_auth?access_token=ACCESS_TOKEN
func UserCreate ¶ added in v1.8.4
func UserCreate(api *token.Api, user *structs.CreateUpdateDepMember) error
UserCreate 创建成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/create?access_token=ACCESS_TOKEN Deprecated: this function simply calls UserCreateV2.
func UserCreateV2 ¶ added in v1.8.29
UserCreateV2 创建成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/create?access_token=ACCESS_TOKEN
func UserDelete ¶ added in v1.8.4
UserDelete 删除成员 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/delete?access_token=ACCESS_TOKEN&userid=USERID
func UserGetByEmail ¶ added in v1.8.4
UserGetByEmail 邮箱获取userid 通过邮箱获取其所对应的userid。 emailType 邮箱类型:1-企业邮箱(默认);2-个人邮箱 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/get_userid_by_email?access_token=ACCESS_TOKEN
func UserGetByMobile ¶ added in v1.8.4
UserGetByMobile 手机号获取userid 通过手机号获取其所对应的userid。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/getuserid?access_token=ACCESS_TOKEN
func UserGetByUserId ¶ added in v1.8.4
UserGetByUserId 读取成员 应用只能获取可见范围内的成员信息,且每种应用获取的字段有所不同,在返回结果说明中会逐个说明。企业通讯录安全特别重要,企业微信将持续升级加固通讯录接口的安全机制,以下是关键的变更点: 从2022年6月20号20点开始,除通讯录同步以外的基础应用(如客户联系、微信客服、会话存档、日程等),以及新创建的自建应用与代开发应用,调用该接口时,不再返回以下字段:头像、性别、手机、邮箱、企业邮箱、员工个人二维码、地址,应用需要通过oauth2手工授权的方式获取管理员与员工本人授权的字段。 【重要】从2022年8月15日10点开始,“企业管理后台 - 管理工具 - 通讯录同步”的新增IP将不能再调用此接口,企业可通过「获取成员ID列表」和「获取部门ID列表」接口获取userid和部门ID列表。查看调整详情。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&userid=USERID
func UserGetDetailByDepartId ¶ added in v1.8.4
UserGetDetailByDepartId 获取部门成员详情 应用只能获取可见范围内的成员信息,且每种应用获取的字段有所不同,在返回结果说明中会逐个说明。企业通讯录安全特别重要,企业微信持续升级加固通讯录接口的安全机制,以下是关键的变更点: 从2022年6月20号20点开始,除通讯录同步以外的基础应用(如客户联系、微信客服、会话存档、日程等),以及新创建的自建应用与代开发应用,调用该接口时,不再返回以下字段:头像、性别、手机、邮箱、企业邮箱、员工个人二维码、地址,应用需要通过oauth2手工授权的方式获取管理员与员工本人授权的字段。 【重要】从2022年8月15日10点开始,“企业管理后台 - 管理工具 - 通讯录同步”的新增IP将不能再调用此接口,企业可通过「获取成员ID列表」和「获取部门ID列表」接口获取userid和部门ID列表。查看调整详情。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/list?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID
func UserGetListId ¶ added in v1.8.4
UserGetListId 获取成员ID列表 获取企业成员的userid与对应的部门ID列表,预计于2022年8月8号发布。若需要获取其他字段,参见「适配建议」。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/list_id?access_token=ACCESS_TOKEN
func UserGetSimpleByDepartId ¶ added in v1.8.4
UserGetSimpleByDepartId 获取部门成员 企业通讯录安全特别重要,企业微信将持续升级加固通讯录接口的安全机制,以下是关键的变更点: 【重要】从2022年8月15日10点开始,“企业管理后台 - 管理工具 - 通讯录同步”的新增IP将不能再调用此接口,企业可通过「获取成员ID列表」和「获取部门ID列表」接口获取userid和部门ID列表。查看调整详情。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/simplelist?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID
func UserMemberAuthList ¶ added in v1.8.4
func UserMemberAuthList(api *token.Api, cursor string, limit int) (*structs.MemberAuthResult, error)
UserMemberAuthList 获取成员授权列表 当企业当前授权模式为成员授权时,可调用该接口获取成员授权列表。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/list_member_auth?access_token=ACCESS_TOKEN
func UserSelectTicket ¶ added in v1.8.4
UserSelectTicket 获取选人ticket对应的用户 当企业以成员授权的方式安装了第三方应用,成员在企业微信终端通过选人jsapi选择通讯录,应用获取到selectedTicket后,可调用该接口获取SelectedTicket对应的用户open_userid列表。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/list_selected_ticket_user?access_token=ACCESS_TOKEN
func UserUpdate ¶ added in v1.8.4
func UserUpdate(api *token.Api, user *structs.CreateUpdateDepMember) error
UserUpdate 更新成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/update?access_token=ACCESS_TOKEN Deprecated: this function simply calls UserUpdateV2.
func UserUpdateV2 ¶ added in v1.8.29
UserUpdateV2 更新成员 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/update?access_token=ACCESS_TOKEN
func UserUserId2OpenId ¶ added in v1.8.4
UserUserId2OpenId userid转openid 该接口使用场景为企业支付,在使用企业红包和向员工付款时,需要自行将企业微信的userid转成openid。 注:需要成员使用微信登录企业微信或者关注微信插件(原企业号)才能转成openid; 如果是外部联系人,请使用外部联系人openid转换转换openid 请求方式:POST(HTTPS) 请求地址: https://qyapi.weixin.qq.com/cgi-bin/user/convert_to_openid?access_token=ACCESS_TOKEN