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
Optional. List the messages before the time. It'll list from the latest messages in the chatroom if not provided.
Optional. The number of messages to retrieve. Default: 10. Max: 100.
Optional. List the messages after the time. It'll list from the oldest messages in the chatroom if not provided.
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.
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
]
Optional. Indicates the message types to list.
The default will list all of the message types if not provided.
Current supported types: INTERACTION_TYPE_CUSTOM
.
Header Parameters
This API should be invoked with the chatroom token.
Responses
- 200
- 400
- 401
- 403
- 500
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- Array [
- ]
- Array [
- ]
- ]
messages object[]
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.
Optional. Immutable. The id of the user. Required if in action trigger operation, otherwise will be an output only field.
Output only. The device id of the user.
Required. The custom name of the user.
Output only. Indicates the user whether is an admin or not.
Output only. Indicates the user whether is a guest or not.
Output only. Indicates the user whether is blocked or not.
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
.
Required. The text of the message.
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.
Output only. The uuid of the pattern that was hit when filtering the message.
Output only. The text of the pattern that was hit when filtering the message.
Output only. The uuid of the dictionary that was hit when filtering the message.
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.
Required. The uuid of the message to pinned.
Required. The text of the message to pinned.
sender objectrequired
Required. The user who sends the message.
Required. The uuid of the user who sends the message.
Required. The device id of the user who sends the message.
Required. The custom name of the user who sends the message.
action_taker objectrequired
Required. The user who pinned the message.
Optional. Immutable. The id of the user. Required if in action trigger operation, otherwise will be an output only field.
Output only. The device id of the user.
Required. The custom name of the user.
Output only. Indicates the user whether is an admin or not.
Output only. Indicates the user whether is a guest or not.
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
.
Required. The uuid of the blocked user.
Required. The device id of the blocked user.
Required. The custom name of the blocked user.
Output only. Indicates whether or not the user was blocked.
action_taker objectrequired
Required. The user who blocked the user.
Optional. Immutable. The id of the user. Required if in action trigger operation, otherwise will be an output only field.
Output only. The device id of the user.
Required. The custom name of the user.
Output only. Indicates the user whether is an admin or not.
Output only. Indicates the user whether is a guest or not.
Output only. Indicates the user whether is blocked or not.
delete_message object
Optional. Required if type
is INTERACTION_TYPE_DELETE_MESSAGE
.
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
.
Optional. Immutable. The uuid of the poll. Required if in update operation, otherwise will be an output only field.
Possible values: [POLL_TYPE_SINGLE_CHOICE
, POLL_TYPE_MULTI_CHOICE
]
Required. Indicates the type of the poll.
Possible values: [POLL_STATUS_QUEUED
, POLL_STATUS_ACTIVE
, POLL_STATUS_CLOSED
, POLL_STATUS_ARCHIVED
]
Output only. Indicates the status of the poll.
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
.
Required. The question of the poll.
options object[]required
Required. The options of the poll.
Optional. Immutable. The uuid of the option. Required if in update operation, otherwise will be an output only field.
Required. The text of this option would be displayed to the viewer.
Required. Indicates this option would be highlighted to the viewer when the poll is closed.
Output only. Indicates the total votes in the option.
Output only. Indicates the time that the poll started.
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.
Required. The uuid of the poll to vote.
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[]
Required. The uuid of the option to vote.
sticker object
Optional. Required if type
is INTERACTION_TYPE_STICKER
.
Required. The unique id of the sticker pack.
Required. The unique id of the sticker.
image object
Output only. The image of the sticker.
thumbnails object[]
Output only.
Output only. Indicates the URI of the image that the browser could be rendered.
Output only. Indicates the width of the image.
Output only. Indicates the height of the image.
metadata object
Output only. The metadata of the sticker.
Output only.
Output only.
viewer_info object
Optional. Required if type
is INTERACTION_TYPE_VIEWER_INFO_ENABLED
or INTERACTION_TYPE_VIEWER_INFO_UPDATE
.
Required. Indicates whether the chat will display the viewer info or not.
Output only. Indicates the number of the concurrent viewers.
Output only. Indicates the version of the viewer info that is useful to check the ordering with other versions.
Output only. Indicates the time that the viewer info was last updated.
custom_message object
Optional. Required if type
is INTERACTION_TYPE_CUSTOM
.
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.
Required. Indicates the key to increment.
Required. Indicates the value to increment.
entrance_message object
Optional. Required if type
is INTERACTION_TYPE_ENTRANCE
.
Output only. The uuid of the user.
Output only. The device id of the user.
Output only. The custom name of the user.
Output only. Indicates the user whether or not an admin.
Output only. Indicates the user whether or not a guest.
custom_counter object
Optional. Required if type
is INTERACTION_TYPE_CUSTOM_COUNTER_UPDATE
.
Required. Immutable. Indicates the key of the custom counter.
Output only. Indicates the current count value of the custom counter.
Output only. Indicates the version of the counter that is useful to check the ordering with other versions.
Output only. Indicates the time that the counter was last updated.
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.
Output only. The number of the concurrent viewers.
Output only. Indicates the time that the count was last updated.
total object
Output only. The total watched viewers.
Output only. The number of the concurrent viewers.
Output only. Indicates the time that the count was last updated.
Output only. The time that the message created. It'll be the same as the received_at
currently.
Required. The time that the message was sent by client-side.
Output only. The time that the message was received by server-side.
Output only. The time that the message was published to message broker.
{
"messages": [
{
"id": "string",
"user": {
"id": "string",
"device_id": "string",
"custom_name": "string",
"is_admin": true,
"is_guest": true,
"blocked": true
},
"type": "INTERACTION_TYPE_TEXT",
"text_message": {
"text": "string",
"filtered": true,
"filter_hit_result": {
"pattern_id": "string",
"pattern_text": "string",
"dictionary_id": "string",
"dictionary_name": "string"
}
},
"pin_unpin_message": {
"message": {
"id": "string",
"text": "string",
"sender": {
"id": "string",
"device_id": "string",
"custom_name": "string"
}
},
"action_taker": {
"id": "string",
"device_id": "string",
"custom_name": "string",
"is_admin": true,
"is_guest": true,
"blocked": true
}
},
"block_unblock_user": {
"id": "string",
"device_id": "string",
"custom_name": "string",
"blocked": true,
"action_taker": {
"id": "string",
"device_id": "string",
"custom_name": "string",
"is_admin": true,
"is_guest": true,
"blocked": true
}
},
"delete_message": {
"id": "string"
},
"poll": {
"id": "string",
"type": "POLL_TYPE_SINGLE_CHOICE",
"status": "POLL_STATUS_QUEUED",
"votes_count": 0,
"multi_choice": {
"question": "string",
"options": [
{
"id": "string",
"text": "string",
"corrected": true,
"votes_count": 0
}
]
},
"started_at": "2024-07-29T15:51:28.071Z",
"ended_at": "2024-07-29T15:51:28.071Z"
},
"vote": {
"poll": {
"id": "string",
"type": "POLL_TYPE_SINGLE_CHOICE",
"multi_choice": {
"options": [
{
"id": "string"
}
]
}
}
},
"sticker": {
"sticker_pack_id": "string",
"sticker_id": "string",
"image": {
"thumbnails": [
{
"uri": "string",
"width": 0,
"height": 0
}
]
},
"metadata": {
"sticker_pack_name": "string",
"sticker_name": "string"
}
},
"viewer_info": {
"enabled": true,
"count": 0,
"version_number": "string",
"updated_at": "2024-07-29T15:51:28.071Z"
},
"custom_message": {
"value": "string",
"incr": {
"key": "string",
"value": 0
}
},
"entrance_message": {
"id": "string",
"device_id": "string",
"custom_name": "string",
"is_admin": true,
"is_guest": true
},
"custom_counter": {
"key": "string",
"value": 0,
"version_number": "string",
"updated_at": "2024-07-29T15:51:28.071Z",
"disabled": true
},
"broadcast_message": {
"viewer_metrics": {
"concurrent": {
"count": 0,
"updated_at": "2024-07-29T15:51:28.071Z"
},
"total": {
"count": 0,
"updated_at": "2024-07-29T15:51:28.071Z"
}
}
},
"created_at": "2024-07-29T15:51:28.071Z",
"sent_at": "2024-07-29T15:51:28.071Z",
"received_at": "2024-07-29T15:51:28.071Z",
"published_at": "2024-07-29T15:51:28.071Z"
}
]
}
A bad request response.
The code
is 3
means got an invalid argument. There are more HTTP status code mappings listed on here and gRPC code on here.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
A unauthenticated response.
The header authorization
was missing or unidentified.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
A forbidden response.
It means that the provided authorization
did not have enough permission to access the resource or the API.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
A server error response. There are more HTTP status code mappings listed on here.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}