# 邀请绑定客服账号

调试工具

接口应在服务器端调用,不可在前端(小程序、网页、APP等)直接调用,具体可参考接口调用指南

接口英文名:invitekfworker

本接口用于邀请微信号绑定客服账号

# 1. 调用方式

# HTTPS 调用

POST https://api.weixin.qq.com/customservice/kfaccount/inviteworker?access_token=ACCESS_TOKEN

# 云调用

  • 本接口不支持云调用

# 第三方调用

  • 本接口支持第三方平台代商家调用。

  • 该接口所属的权限集 id 为:1、6、19、100-101

  • 服务商获得其中之一权限集授权后,可通过使用 authorizer_access_token 代商家进行调用,具体可查看 第三方调用 说明文档。

# 2. 请求参数

# 查询参数 Query String parameters

参数名类型必填说明
access_tokenstring接口调用凭证,可使用 access_tokenauthorizer_access_token

# 请求体 Request Payload

参数名类型必填说明
kf_accountstring完整客服帐号,格式为:帐号前缀@公众号微信号
invite_wxstring接收绑定邀请的客服微信号

# 3. 返回参数

# 返回体 Response Payload

参数名类型说明
errcodenumber错误码
errmsgstring错误信息

# 4. 注意事项

本接口无特殊注意事项

# 5. 代码示例

请求示例

{
    "kf_account" : "test1@test",
    "invite_wx" : "test_kfwx"
 }

返回示例

{
  "errcode": 0,
  "errmsg": "ok"
}

# 6. 错误码

以下是本接口的错误码列表,其他错误码可参考 通用错误码

错误码错误描述解决方案
65407the wechat user have been one of your workers已是公众号客服
65408you have already invited the wechat user已发送邀请
65409wechat account invalid无效微信号
65410too many custom service accounts bound by the worker绑定数量超限
65411a effective invitation to bind the custom service account exists 存在待确认邀请
65412the custom service account have been bound by a wechat user已绑定微信号

# 7. 适用范围

本接口在不同账号类型下的可调用情况:
小程序公众号服务号小游戏
仅认证 仅认证
  • ✔:该账号可调用此接口
  • 仅认证:表示仅允许企业主体已认证账号调用,未认证或不支持认证的账号无法调用
  • 其他未明确声明的账号类型,如无特殊说明,均不可调用此接口;