同一主体小程序和公众号号都授权给第三方服务商,为什么小程序登录unionId为空?

小程序 文章 2021-03-29 14:02 562 0 全屏看文

AI助手支持GPT4.0

同一主体小程序和公众号号都授权给第三方服务商,为什么小程序登录unionId为空?The mini program and official account of the same subject are both authorized to a third-party service provider, why is the mini program login unionId empty?

同一主体小程序和公众号号都授权给第三方服务商,为什么小程序登录unionId为空?

调用https://api.weixin.qq.com/sns/component/jscode2session接口返回只有session_key和openid;

然后以为去试着解密用户敏感信息 结果还是没有unionId

大佬们教教我

call https://api.weixin.qq.com/sns/component/jscode2session The interface returns only session_ Key and openid; then I thought I was trying to decrypt the user's sensitive information, but there was no unionid to teach me

回答:

Hoooooo!:

不是授权,是需要绑定

青寒:

不管是你们直接绑定开放平台,还是通过第三方帮你们绑定一个开放平台,小程序和公众号都得绑定到开放平台,只有这样才会生成unionid,并且保证同一用户的unionid相同。

你可以分别登陆小程序和公众号的后台,查一下一绑定的微信开放平台信息。

拾忆:

还需要绑定开放平台

-EOF-

AI助手支持GPT4.0