contacts/add-friend

Description

  • Initiate a friend request.
  • You have the option to personalize your method of adding friends, but it's advisable to align it with the v3 acquisition channels to avoid potential risk prompts for the other party.

Request URL

  • http://127.0.0.1:8888/api/

Request Method

  • POST

Parameters

Parameter NameRequiredParameter TypeDescription
typeYesintAPI ID
encryptUserNameYesstringUser v3 data
messageNostringGreeting message
ticketYesstringUser`s v4 data
verifyTypeNointDefault is 6, the method of addition
chatroomUserNameNostringThis parameter only takes effect when adding to a group chat

添加方式

MethodEnum
Search QQ number1
Search WeChat ID3
Friend verification message6
Group chat14
Search phone number15
People nearby18
Shake Shake24

Request Example

 {
  "type": 10033,
  "encryptUserName": "v3_xxxx",
  "message": "Hello, I have a question to ask.",
  "ticket": "v4_xxxx",
  "verifyType": 6
 } 
 {
  "type": 10033,
  "encryptUserName": "wxid_xxxx",
  "ticket": "v4_xxxx",
  "chatroomUserName": "xxx@chatroom", 
  "verifyType": 14,
 } 

Return Example

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

Return Parameter Description

Parameter NameParameter TypeDescription
error_codeintError code
descriptionstringError Description
datajsonBusiness data

Remark