contacts/retrieve-friends-info

Description

  • Fetch user data, encompassing regular users, group chats, and official accounts.
  • You can input either a single wxid or a list of wxids, but refrain from exceeding 20 wxids per single call.
  • Be mindful that there are distinctions in the return structure between string parameters and list parameters.

哪个更好取决于您更喜欢的语言风格。第二个版本在流畅性上可能稍微优于第一个版本,因为它更加简洁清晰。

Request URL

  • http://127.0.0.1:8888/api/

Request Method

  • POST

Parameters

Parameter NameRequiredParameter TypeDescription
typeYesintAPI ID
userNameYesstring, listuser`s wxid or list
chatroomUserNameNostringChat Room Id,When this parameter is specified, the target user information will be fetched through group chat.

Request Example

 {
  "type": 10015,
  "userName": "filehelper"
 } 
 {
  "type": 10015,
  "userName": "wxid_xxx",
  "chatroomUserName": "xxx@chatroom"
 }

If the target users are in a group chat, additional fields will be included:
- chatroomMaxCount: Indicates the maximum number of members in the current group chat.
- chatroomAccessType: Specifies the current group chat verification method (0: No verification, 2: Requires administrator approval).
 {
  "type": 10015,
  "userName": ["filehelper", "gh_xxx", "wxid_xxx"]
 } 

Return Example

  {
    "data": {
      "status": 0,
      "desc": "",
      "data": []
    }
  }

Return Parameter Description

Parameter NameParameter TypeDescription
error_codeintError code
descriptionstringError Description
datajsonBusiness data

Remark