Chuyển tới nội dung chính

(33) New message listener

Tình huống kích hoạt

Khi creator gửi tin nhắn cho seller.

Tham số nghiệp vụ dữ liệu

Parameter nameData TypeSampleDescription
typeint6433Loại webhook, cố định là 33 cho webhook này.
shop_idstring"7494049642642441621"TikTok shop ID.
tts_notification_idstring"7327112393057371910"ID của webhook.
timestampint1644412885Dấu thời gian UNIX khi webhook này được kích hoạt.
dataobject
└indexstring"1735032460678899"Chỉ số của tin nhắn trong cuộc trò chuyện. Số chỉ mục lớn tương ứng với tin nhắn mới hơn.
└message_idstring"7451907556216407553"Message ID.
└conversation_idstring"7451873679308620048"ID của cuộc trò chuyện mà tin nhắn thuộc về.
└msg_typestring"TEXT"Loại tin nhắn, với các giá trị có thể: * TEXT * PRODUCT_CARD * TARGET_COLLABORATION_CARD * FREE_SAMPLE_CARD
└contentstring"Hello"Nội dung tin nhắn, ở dạng chuỗi JSON đã được tuần tự hóa. * TEXT: {"content": "simple text"} * PRODUCT_CARD: {"product_id": "12345"} * TARGET_INVITATION_CARD: {"invitation_group_id": "1234"} * FREE_SAMPLE_CARD: {"apply_id": "1234"}
└create_timestring1691411573Thời gian tạo tin nhắn, biểu diễn dưới dạng dấu thời gian Unix (giây).
└senderobject
└└sender_im_user_idstring"2368694990397660924"ID trong hệ thống IM của người gửi.

Ví dụ sự kiện

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"
}
}
}