10- Get user information

10- Get user information

table of Contents

1. Get the basic information of the following users

2. Webpage authorization (obtain information of unfollowed personnel)


 

1. Get the basic information of the following users

 

The first is the official WeChat document

https://developers.weixin.qq.com/doc/offiaccount/User_Management/Get_users_basic_information_UnionID.html#UinonId

Get information about the people who follow the official account

https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN

Ordinary get requests will not be developed

2. Webpage authorization (obtain information of unfollowed personnel)

 

https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html

This piece cannot be done using the ngrok simulated account.

1 第一步:用户同意授权,获取code
2 第二步:通过code换取网页授权access_token
3 第三步:刷新access_token(如果需要)
4 第四步:拉取用户信息(需scope为 snsapi_userinfo)
5 附:检验授权凭证(access_token)是否有效

A complete set of call chains

 

But I haven't thought of the application scenario of this for the time being.

 

 

Guess you like

Origin blog.csdn.net/baidu_31572291/article/details/114339467