之前base级别是可以获取到用户的unionid的 微信返回值如下:
"{"access_token":"4_fnOCtmxaP8LX5uMyw_ywbt7uarspAB87iYec5o7q1F0rKYV0bWnd6yJRSmBZ0-4HSDIxIdYt3auMH2b5TiIUvg","expires_in":7200,"refresh_token":"4_egFGokURBNm1wmzdbZ5ctxijsJfUSS_5yZQN4-5FMhHpraSJbO1KJBXayjA4nD25VIOaBa2f2hK4pyCAXVlwJg","openid":"oBj2mwjO4eYD3-NeIzGOq1ItKDjM","scope":"snsapi_base","unionid":"ok7mjwgD1bX4EBcZ7o8HXb3BMWDg"}"
现在的返回值如下:
"{"access_token":"4_l3XnnqJ8AKr80yTm5MjL7XfH_4uyEaEs1jNGnCqW8LlQRdZmajpPuzsfsaRuHNTm9uMwhPykAYl7CLD0ZaSjlA","expires_in":7200,"refresh_token":"4_hExJtyFVnjujXkGxGcH8_epn-B1ct2Svnxc8ds12xBJzC91PXwdRxcuz3YAUopMxiNB0SBPWc0LvQSXyuiAHHA","openid":"ofmwKxHJ81wzT5WJPO9EJLMOG4kI","scope":"snsapi_base"}"
调用的接口是:https://api.weixin.qq.com/sns/oauth2/access_token
现在测试号上调用还是和之前一样,但是线上环境调用unionid就丢失了 不知道是什么问题
您好,这个接口目前在scope为snsapi_base的情况下不返回unionid。请尽快修改调用方式。
看了下时间 大概变更时间是 2017-11-27 16:00 左右,是不是官方更新了API呢