Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

企业号已经更新为企业微信,返回信息由变化 #344

Open
EvansYe2 opened this issue Jul 14, 2017 · 0 comments
Open

企业号已经更新为企业微信,返回信息由变化 #344

EvansYe2 opened this issue Jul 14, 2017 · 0 comments

Comments

@EvansYe2
Copy link

EvansYe2 commented Jul 14, 2017

整体的差异
返回值的差异
企业微信的所有接口都会返回errmsg和errcode,所以在判断是否成功时不能以判断是否存在此字段为依据。
访问凭证的差异
企业微信的访问凭证更长,请保留足够的长度,至少为512字节。
自建应用的Secret差异
企业号每个管理组一个密钥,企业微信每个自建应用对应一个密钥
接口的差异
有部分接口在细节处有所差异,详见https://work.weixin.qq.com/api/doc#11385。

代码中类似于这样的都需要更改:
if (!$json || isset($json['errcode']))

if (!$json || !empty($json['errcode']) || $json['errcode']!=0)

另外,建议能够用上命名空间

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant