WeChat Open Platform

Official Accounts Documentation

Follower List


This API enables Official Accounts to obtain a follower list that contains several OpenIDs (unique encrypted WeChat IDs for each user of an Official Account). Each user has separate OpenIDs that correspond to different Official Accounts. Developers can fetch up to 10,000 OpenIDs by calling this API once. This API can be called multiple times.

Request Format

HTTP request method: GET (Use HTTPS protocol)

https://api.wechat.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID

Important Note: Which URL to send my HTTP requests

Parameter Required Description
access_token Yes The certificate for the calling API
next_openid Yes The first OpenID to be loaded. Load from the first follower if it is empty
Response format

An example of a successful JSON response is as follows:

{
  "total":2,
  "count":2,
  "data":{"openid":["","OPENID1","OPENID2"]},
  "next_openid":"NEXT_OPENID"
}
Parameter Description
total The total number of the followers
count The quantity of loaded OpenIDs (maximum 10,000)
data OpenID list
next_openid The last OpenID loaded

An example of an unsuccessful JSON response (caused by invalid AppID) is as follows:

 {
   "errcode":40013,
   "errmsg":"invalid appid"
 }

Fetching the Followers List with More than 10,000 Followers


When there are more than 10,000 followers, you can load the whole follower list through multiple callings by setting the next_openid parameter. To do so, you can set it to the value of the parameter returned after the last call. An example is given below:

Suppose official account A has 23,000 followers. The request URLs for loading all the followers can theRefore be as follows:

First, we call https://api.wechat.com/cgi-bin/user/get?access_token=ACCESS_TOKEN

Important Note: Which URL to send my HTTP requests

Response:
    {  
      "total":23000,  
      "count":10000,  
      "data":{"  
         openid":[  
            "OPENID1",  
            "OPENID2",  
            ...,  
            "OPENID10000"  
         ]  
       },  
       "next_openid":"NEXT_OPENID1"  
    }

Then, we call https://api.wechat.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID1.

Important Note: Which URL to send my HTTP requests

Response:
    {  
       "total":23000,  
       "count":10000,  
       "data":{  
         "openid":[  
           "OPENID10001",  
           "OPENID10002",  
           ...,  
           "OPENID20000"  
         ]  
       },  
       "next_openid":"NEXT_OPENID2"  
    }

To get the third page of results, we call https://api.wechat.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID2

Important Note: Which URL to send my HTTP requests

Response: (The next_openid is empty when the whole list is returned):
    {  
       "total":23000,  
       "count":3000,  
       "data":{"  
           "openid":[  
             "OPENID20001",  
             "OPENID20002",  
             ...,  
             "OPENID23000"  
           ]  
       },  
       "next_openid":" "  
    }