Skip to content

Get Creator Conversation Messages

GET
/affiliate_seller/202412/conversation/{conversation_id}/messages

Retrieves a page of messages from a conversation.

conversation_id
required
string

The identifier of a conversation that belongs to the current seller.

shop_cipher
required
string

Identifies the shop. Obtain it from the Get Authorized Shops API.

page_size
required
integer format: int64

The maximum number of messages to return. Must be between 1 and 20.

page_token
string

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.

Success

Media typeapplication/json
object
code

Status code; 0 means success.

integer format: int64
message

Success or failure message.

string
request_id

Request log ID.

string
data
object
has_more

Whether there are any more messages.

boolean
next_page_token

When has_more is true, pass this cursor as page_token in the next request. It is empty when has_more is false.

string
messages
Array<object>
object
conversation_index

Index of the message in the conversation. Higher index corresponds to newer message.

string
message_body

Message’s content

object
id

Message ID.

string
conversation_id

Conversation ID to which the message belongs.

string
type

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
string
Allowed values: TEXT PRODUCT_CARD TARGET_COLLABORATION_CARD FREE_SAMPLE_CARD IMAGE CRM_TEXT_WITH_IMAGE_CARD CRM_TEXT_WITH_PRODUCTS_CARD NOTIFICATION EMOTICONS SYSTEM
content

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]}
  • NOTIFICATION or SYSTEM: {"content": "notification/system message"}
  • EMOTICONS: {"height": "110", "url": "<image_url>", "width": "110"}
string
create_time

Message creation time, represented as a Unix timestamp (seconds).

integer format: int64
sender_id

The message sender im id

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