Retrieves a page of messages from a conversation.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The identifier of a conversation that belongs to the current seller.
Query Parameters
Section titled “Query Parameters”Identifies the shop. Obtain it from the Get Authorized Shops API.
The maximum number of messages to return. Must be between 1 and 20.
The pagination cursor. Omit this parameter for the first request. When has_more is true, pass the previous response’s next_page_token to retrieve the next page.
Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
Whether there are any more messages.
When has_more is true, pass this cursor as page_token in the next request. It is empty when has_more is false.
object
Index of the message in the conversation. Higher index corresponds to newer message.
Message’s content
object
Message ID.
Conversation ID to which the message belongs.
Message type. Possible values:
- TEXT
- PRODUCT_CARD
- TARGET_COLLABORATION_CARD
- FREE_SAMPLE_CARD
- IMAGE
- CRM_TEXT_WITH_IMAGE_CARD
- CRM_TEXT_WITH_PRODUCTS_CARD
- NOTIFICATION
- EMOTICONS
- SYSTEM
Message content serialized as a JSON string. The JSON object depends on type:
TEXT:{"content": "simple text"}PRODUCT_CARD:{"product_id": "12345"}TARGET_COLLABORATION_CARD:{"invitation_group_id": "1234"}FREE_SAMPLE_CARD:{"apply_id": "1234"}IMAGE:{"height": "290", "url": "<image_url>", "width": "304"}CRM_TEXT_WITH_IMAGE_CARD:{"title": "abc", "content": "efg", "url": "<image_url>"}CRM_TEXT_WITH_PRODUCTS_CARD:{"title": "abc", "content": "efg", "product_ids": [123, 456, 789, 222]}NOTIFICATIONorSYSTEM:{"content": "notification/system message"}EMOTICONS:{"height": "110", "url": "<image_url>", "width": "110"}
Message creation time, represented as a Unix timestamp (seconds).
The message sender im id
Example
{ "code": 0, "data": { "has_more": true, "next_page_token": "1735032460678899", "messages": [ { "conversation_index": "1735032460678899", "message_body": { "id": "7451907556216407553", "conversation_id": "7451873679308620048", "type": "TEXT", "content": "{\"content\": \"simple text message\"}", "create_time": 1691411573, "sender_id": "2368694990397660924" } } ] }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}