Documentation

Development

User Acquisition

Monetization

Industry

Vivox Unity SDK

Vivox Unity SDK

Vivox
​
​
Vivox Unity SDK
  • Overview
  • Get started
  • Release notes
  • Developer guide
    • Set up your project
    • Create voice and text channels
    • Messaging
      • Channel messages
      • Message metadata
      • Chat history
        • Chat History query options
      • Edit and delete messages
      • Directed messages
      • Offline direct messages
      • Anti-flooding
      • Large text channel setting
      • Retrieve Conversations list
      • Set Chat Markers
    • Player management
    • Device management
    • Audio management
    • Mobile development
    • Text-to-speech
    • Speech-to-text
    • Real-time recording
    • Server-side-recording
    • Troubleshooting
  • Tutorials
  • Reference
  1. Vivox Unity SDK documentation

Chat history

Retrieve and manage chat message history.
Read time 1 minute
Last updated 8 months ago

Channel text message history

Vivox allows for users to access the history of a channel's text activity using
VivoxService.Instance.GetChannelTextMessageHistoryAsync(string channelName, int requestSize = 10, ChatHistoryQueryOptions chatHistoryQueryOptions = null)
, with
channelName
being the name of the channel to request the history of,
requestSize
being the number of messages to return at a maximum (10 is the default), and
chatHistoryQueryOptions
being an optional parameter which can do things like specifying a word or phrase contained in the messages, a specific PlayerId sender of the messages, or times to query before or after. More specific information on
ChatHistoryQueryOption
s can be found in Chat history query options.
The messages returned in
IReadOnlyCollection
are listed in order from newest message to oldest message.
Note
Chat history is stored for 7 days. If Text Evidence Management is in use, the storage period for chat history is extended to 30 days.
The following code snippet is an example of pulling at most recent 25 messages from a set LobbyChannelName, then logging the sender's display name and the message in order from oldest to newest, without using the optional ChatHistoryQueryOptions.
public async void FetchHistoryAsync(){ var historyMessages = await VivoxService.Instance.GetChannelTextMessageHistoryAsync(LobbyChannelName, 10); //Reversing the messages so they display from oldest to newest var reversedMessages = historyMessages.Reverse(); foreach(VivoxMessage message in reversedMessages) { Debug.Log($"{message.SenderDisplayName}: {message.MessageText}"); }}

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Channel text message history


Report a problem with this page
​
​