跳到主要内容

List chatroom messages

GET 

/bv/chatroom/v1/chatrooms/messages

List messages in the chatroom.

The default without any query parameters will retrieve 100 messages from the latest to the oldest, and can continue to retrieve the next 100 messages by providing the before_at query parameter which can assign the received_at value of the first message from the previous response. If the response returns an empty array, it means there is no more message.

It can also retrieve the messages in different directions: from oldest to latest by providing the from_oldest=true, and continue to retrieve the next 100 messages by providing the after_at query parameter which can assign the received_at value of the last message from the previous response. If the response returns an empty array, it means there is no more message.

Authorization requires the chatroom token in the header.

Request

Query Parameters

    before_at date-time

    Optional. List the messages before the time. It'll list from the latest messages in the chatroom if not provided.

    limit int32

    Optional. The number of messages to retrieve. Default: 10. Max: 100.

    after_at date-time

    Optional. List the messages after the time. It'll list from the oldest messages in the chatroom if not provided.

    from_oldest boolean

    Optional. Indicates whether the list direction is from the oldest to the latest message. The default list direction is from the latest to the oldest message.

Header Parameters

    authorization string

    This API should be invoked with the chatroom token.

Responses

A successful response.

Schema
    messages object[]
  • Array [
  • id string

    Optional. Immutable. The uuid of the message. It will generate an UUID string if not provided.

    user objectrequired

    Required. The user of the message that was sent by.

    id string

    Optional. Immutable. The id of the user. Required if in action trigger operation, otherwise will be an output only field.

    device_id string

    Output only. The device id of the user.

    custom_name stringrequired

    Required. The custom name of the user.

    is_admin boolean

    Output only. Indicates the user whether is an admin or not.

    is_guest boolean

    Output only. Indicates the user whether is a guest or not.

    blocked boolean

    Output only. Indicates the user whether is blocked or not.

    type stringrequired

    Possible values: [INTERACTION_TYPE_TEXT, INTERACTION_TYPE_MUTE, INTERACTION_TYPE_UNMUTE, INTERACTION_TYPE_PIN_MESSAGE, INTERACTION_TYPE_UNPIN_MESSAGE, INTERACTION_TYPE_DELETE_MESSAGE, INTERACTION_TYPE_BLOCK_USER, INTERACTION_TYPE_UNBLOCK_USER, INTERACTION_TYPE_POLL_STARTED, INTERACTION_TYPE_POLL_CLOSED, INTERACTION_TYPE_POLL_ARCHIVED, INTERACTION_TYPE_POLL_UPDATE, INTERACTION_TYPE_POLL_USER_VOTE, INTERACTION_TYPE_STICKER, INTERACTION_TYPE_VIEWER_INFO_ENABLED, INTERACTION_TYPE_VIEWER_INFO_DISABLED, INTERACTION_TYPE_VIEWER_INFO_UPDATE, INTERACTION_TYPE_CUSTOM, INTERACTION_TYPE_ENTRANCE, INTERACTION_TYPE_CUSTOM_COUNTER_UPDATE, INTERACTION_TYPE_BROADCAST_UPDATE]

    Required. The type of the message.

    text_message object

    Optional. Required if type is INTERACTION_TYPE_TEXT.

    text stringrequired

    Required. The text of the message.

    filtered boolean

    Output only. Indicates whether the text message was filtered or not.

    filter_hit_result object

    Output only. The filter result when the text message was filtered.

    pattern_id string

    Output only. The uuid of the pattern that was hit when filtering the message.

    pattern_text string

    Output only. The text of the pattern that was hit when filtering the message.

    dictionary_id string

    Output only. The uuid of the dictionary that was hit when filtering the message.

    dictionary_name string

    Output only. The name of the dictionary that was hit when filtering the message.

    pin_unpin_message object

    Optional. Required if type is INTERACTION_TYPE_PIN_MESSAGE or INTERACTION_TYPE_UNPIN_MESSAGE.

    message objectrequired

    Required. The message to pinned.

    id stringrequired

    Required. The uuid of the message to pinned.

    text stringrequired

    Required. The text of the message to pinned.

    sender objectrequired

    Required. The user who sends the message.

    id stringrequired

    Required. The uuid of the user who sends the message.

    device_id stringrequired

    Required. The device id of the user who sends the message.

    custom_name stringrequired

    Required. The custom name of the user who sends the message.

    action_taker objectrequired

    Required. The user who pinned the message.

    id string

    Optional. Immutable. The id of the user. Required if in action trigger operation, otherwise will be an output only field.

    device_id string

    Output only. The device id of the user.

    custom_name stringrequired

    Required. The custom name of the user.

    is_admin boolean

    Output only. Indicates the user whether is an admin or not.

    is_guest boolean

    Output only. Indicates the user whether is a guest or not.

    blocked boolean

    Output only. Indicates the user whether is blocked or not.

    block_unblock_user object

    Optional. Required if type is INTERACTION_TYPE_BLOCK_USER or INTERACTION_TYPE_UNBLOCK_USER.

    id stringrequired

    Required. The uuid of the blocked user.

    device_id stringrequired

    Required. The device id of the blocked user.

    custom_name stringrequired

    Required. The custom name of the blocked user.

    blocked boolean

    Output only. Indicates whether or not the user was blocked.

    action_taker objectrequired

    Required. The user who blocked the user.

    id string

    Optional. Immutable. The id of the user. Required if in action trigger operation, otherwise will be an output only field.

    device_id string

    Output only. The device id of the user.

    custom_name stringrequired

    Required. The custom name of the user.

    is_admin boolean

    Output only. Indicates the user whether is an admin or not.

    is_guest boolean

    Output only. Indicates the user whether is a guest or not.

    blocked boolean

    Output only. Indicates the user whether is blocked or not.

    delete_message object

    Optional. Required if type is INTERACTION_TYPE_DELETE_MESSAGE.

    id string

    Required. The uuid of the message that targets to be deleted.

    poll object

    Optional. Required if type is INTERACTION_TYPE_POLL_STARTED, INTERACTION_TYPE_POLL_CLOSED, INTERACTION_TYPE_POLL_ARCHIVED or INTERACTION_TYPE_POLL_UPDATE.

    id string

    Optional. Immutable. The uuid of the poll. Required if in update operation, otherwise will be an output only field.

    type stringrequired

    Possible values: [POLL_TYPE_SINGLE_CHOICE, POLL_TYPE_MULTI_CHOICE]

    Required. Indicates the type of the poll.

    status string

    Possible values: [POLL_STATUS_QUEUED, POLL_STATUS_ACTIVE, POLL_STATUS_CLOSED, POLL_STATUS_ARCHIVED]

    Output only. Indicates the status of the poll.

    votes_count int32

    Output only. Indicates the total votes in the poll.

    multi_choice object

    Optional. Required if type is POLL_TYPE_SINGLE_CHOICE or POLL_TYPE_MULTI_CHOICE.

    question stringrequired

    Required. The question of the poll.

    options object[]required

    Required. The options of the poll.

  • Array [
  • id string

    Optional. Immutable. The uuid of the option. Required if in update operation, otherwise will be an output only field.

    text stringrequired

    Required. The text of this option would be displayed to the viewer.

    corrected booleanrequired

    Required. Indicates this option would be highlighted to the viewer when the poll is closed.

    votes_count int32

    Output only. Indicates the total votes in the option.

  • ]
  • started_at date-time

    Output only. Indicates the time that the poll started.

    ended_at date-time

    Output only. Indicates the time that the poll ended.

    vote object

    Optional. Required if type is INTERACTION_TYPE_POLL_USER_VOTE.

    poll objectrequired

    Required. The poll of the viewer to vote.

    id stringrequired

    Required. The uuid of the poll to vote.

    type stringrequired

    Possible values: [POLL_TYPE_SINGLE_CHOICE, POLL_TYPE_MULTI_CHOICE]

    Required. The type of the poll to vote.

    multi_choice object

    Optional. Required if type is POLL_TYPE_SINGLE_CHOICE or POLL_TYPE_MULTI_CHOICE.

    options object[]
  • Array [
  • id stringrequired

    Required. The uuid of the option to vote.

  • ]
  • sticker object

    Optional. Required if type is INTERACTION_TYPE_STICKER.

    sticker_pack_id stringrequired

    Required. The unique id of the sticker pack.

    sticker_id stringrequired

    Required. The unique id of the sticker.

    image object

    Output only. The image of the sticker.

    thumbnails object[]

    Output only.

  • Array [
  • uri string

    Output only. Indicates the URI of the image that the browser could be rendered.

    width int32

    Output only. Indicates the width of the image.

    height int32

    Output only. Indicates the height of the image.

  • ]
  • metadata object

    Output only. The metadata of the sticker.

    sticker_pack_name string

    Output only.

    sticker_name string

    Output only.

    viewer_info object

    Optional. Required if type is INTERACTION_TYPE_VIEWER_INFO_ENABLED or INTERACTION_TYPE_VIEWER_INFO_UPDATE.

    enabled booleanrequired

    Required. Indicates whether the chat will display the viewer info or not.

    count int32

    Output only. Indicates the number of the concurrent viewers.

    version_number int64

    Output only. Indicates the version of the viewer info that is useful to check the ordering with other versions.

    updated_at date-time

    Output only. Indicates the time that the viewer info was last updated.

    custom_message object

    Optional. Required if type is INTERACTION_TYPE_CUSTOM.

    value stringrequired

    Required. Indicates the value of the custom message in a string.

    incr object

    Optional. Indicates to increment the counter with the specified key and value.

    key stringrequired

    Required. Indicates the key to increment.

    value int32required

    Required. Indicates the value to increment.

    entrance_message object

    Optional. Required if type is INTERACTION_TYPE_ENTRANCE.

    id string

    Output only. The uuid of the user.

    device_id string

    Output only. The device id of the user.

    custom_name string

    Output only. The custom name of the user.

    is_admin boolean

    Output only. Indicates the user whether or not an admin.

    is_guest boolean

    Output only. Indicates the user whether or not a guest.

    custom_counter object

    Optional. Required if type is INTERACTION_TYPE_CUSTOM_COUNTER_UPDATE.

    key stringrequired

    Required. Immutable. Indicates the key of the custom counter.

    value int32

    Output only. Indicates the current count value of the custom counter.

    version_number int64

    Output only. Indicates the version of the counter that is useful to check the ordering with other versions.

    updated_at date-time

    Output only. Indicates the time that the counter was last updated.

    disabled boolean

    Output only. Indicates whether the custom counter is disabled or not.

    broadcast_message object

    Optional. Required if type is INTERACTION_TYPE_BROADCAST_UPDATE.

    viewer_metrics object

    Output only. The playback viewer metrics.

    concurrent object

    Output only. The concurrent unique viewers.

    count int32

    Output only. The number of the concurrent viewers.

    updated_at date-time

    Output only. Indicates the time that the count was last updated.

    total object

    Output only. The total watched viewers.

    count int32

    Output only. The number of the concurrent viewers.

    updated_at date-time

    Output only. Indicates the time that the count was last updated.

    created_at date-time

    Output only. The time that the message created. It'll be the same as the received_at currently.

    sent_at date-timerequired

    Required. The time that the message was sent by client-side.

    received_at date-time

    Output only. The time that the message was received by server-side.

    published_at date-time

    Output only. The time that the message was published to message broker.

  • ]
Loading...