Platform API
Before writing a message
Adjust permitted message fields before the message is written to OpenIM storage.
HTTP request
POST {WEBHOOK_ADDRESS}/callbackBeforeMsgModifyCommandRequest body
The payload contains callbackCommand: callbackBeforeMsgModifyCommand and the message fields described on Before sending a one-to-one message. recvID and keyVersion are Enterprise extensions for this callback.
Response
Return the common before-event fields from Webhooks overview. The response may replace content, recipient or group identifiers, message IDs, sender profile, conversation and content types, status, sending options, offline push data, mention data, attachments, and extension data.
Processing rules
- Configuration key:
beforeMsgModify. - OpenIM waits synchronously. Use
nextCode: 1to reject writing the message; timeout behavior followsfailedContinue. - Return only fields that should replace the values OpenIM is about to write.
Was this page helpful?