Browse Platform API
Platform API

Before updating user information

Copy

Validate or adjust profile fields before OpenIM updates a user.

HTTP request

POST {WEBHOOK_ADDRESS}/callbackBeforeUpdateUserInfoCommand

Request body

PropertyRequiredTypeDescription
callbackCommandYesstringcallbackBeforeUpdateUserInfoCommand.
userIDYesstringUser being updated.
nickNameNostringProposed nickname.
faceURLNostringProposed avatar URL.
exNostringProposed extension data.

Response

Return the common before-event response and optional nickName, faceURL, or ex replacements. Only returned business fields override the pending update.

Processing rules

  • Configuration key: beforeUpdateUserInfo.
  • Use nextCode: 1 to reject the update.