Browse Platform API
Platform API

Before accepting a friend request

Copy

Validate a friend-request acceptance.

HTTP request

POST {WEBHOOK_ADDRESS}/callbackBeforeAddFriendAgreeCommand

Request body

PropertyTypeDescription
callbackCommandstringcallbackBeforeAddFriendAgreeCommand.
fromUserIDstringUser performing the action
blackUserIDstringCounterparty user ID
HandleResultintRequest handling result
HandleMsgstringHandling message

Response

Return the common before-event response from Webhooks overview. Use nextCode: 1 to reject the operation.

Processing rules

  • Configuration key: beforeAddFriendAgree.
  • OpenIM waits synchronously; timeout behavior follows failedContinue.
  • The protocol retains the historical field names blackUserID, HandleResult, and HandleMsg; parse them exactly as shown.