Skip to main content

(33) New message listener

Trigger scenario

When a creator sends a message to the seller.

Data business parameters

Parameter nameData TypeSampleDescription
typeint6433Webhook type, fixed to 33 for this webhook.
shop_idstring"7494049642642441621"TikTok shop ID.
tts_notification_idstring"7327112393057371910"ID of the webhook.
timestampint1644412885The UNIX timestamp when this webhook was triggered.
dataobject
└indexstring"1735032460678899"Index of the message in the conversation. A large index number corresponds to newer message.
└message_idstring"7451907556216407553"Message ID.
└conversation_idstring"7451873679308620048"ID of the conversation to which the message belongs.
└msg_typestring"TEXT"Message type, with possible values: * TEXT * PRODUCT_CARD * TARGET_COLLABORATION_CARD * FREE_SAMPLE_CARD
└contentstring"Hello"Message content, in JSON serialized string. * TEXT: {"content": "simple text"} * PRODUCT_CARD: {"product_id": "12345"} * TARGET_INVITATION_CARD: {"invitation_group_id": "1234"} * FREE_SAMPLE_CARD: {"apply_id": "1234"}
└create_timestring1691411573Message creation time, represented as a Unix timestamp (seconds).
└senderobject
└└sender_im_user_idstring"2368694990397660924"ID in IM system for the sender.

Event example

JSONWord Wrap

{
"type": 33,
"shop_id": "7494049642642441621",
"tts_notification_id": "7327112393057371910",
"timestamp": 1644412885,
"data": {
"index": "1735032460678899",
"message_id": "7451907556216407553",
"conversation_id": "7451873679308620048",
"msg_type": "TEXT",
"content": "Hello",
"create_time": "1691411573",
"sender": {
"sender_im_user_id": "2368694990397660924"
}
}
}