MCPcopy
hub / github.com/wechatpy/wechatpy / add_account

Method add_account

wechatpy/client/api/customservice.py:15–35  ·  view source on GitHub ↗

添加客服账号 详情请参考 http://mp.weixin.qq.com/wiki/1/70a29afed17f56d537c833f89be979c9.html :param account: 完整客服账号,格式为:账号前缀@公众号微信号 :param nickname: 客服昵称,最长6个汉字或12个英文字符 :param password: 客服账号登录密码 :return: 返回的 JSON 数据包

(self, account, nickname, password)

Source from the content-addressed store, hash-verified

13class WeChatCustomService(BaseWeChatAPI):
14
15 def add_account(self, account, nickname, password):
16 """
17 添加客服账号
18 详情请参考
19 http://mp.weixin.qq.com/wiki/1/70a29afed17f56d537c833f89be979c9.html
20
21 :param account: 完整客服账号,格式为:账号前缀@公众号微信号
22 :param nickname: 客服昵称,最长6个汉字或12个英文字符
23 :param password: 客服账号登录密码
24 :return: 返回的 JSON 数据包
25 """
26 password = to_binary(password)
27 password = hashlib.md5(password).hexdigest()
28 return self._post(
29 'https://api.weixin.qq.com/customservice/kfaccount/add',
30 data={
31 'kf_account': account,
32 'nickname': nickname,
33 'password': password
34 }
35 )
36
37 def update_account(self, account, nickname, password):
38 """

Callers 1

Calls 2

to_binaryFunction · 0.90
_postMethod · 0.45

Tested by 1