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
      • 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

Anti-flooding

Implement anti-flooding measures for text chat.
Read time 2 minutes
Last updated 8 months ago

Note
This feature is in Open Beta.
Vivox can help mitigate text message flooding through pre-login value settings. Anti-flooding sets a limit for the text message length as well as the number of text messages sent per second. Use this feature to limit texting rate to prevent channels from being flooded by a player.
If a player attempts to send a text message that exceeds the text message length, the requested message is not sent and an error code reading “The message is too large and cannot be sent” is returned.
Rate limiting is enforced by the Vivox SDK. If a user tries to send messages at a rate higher than allowed, a
VxErrorMessageTextRateExceeded
error is returned.
vx_req_account_send_msg *req;vx_req_account_send_msg_create(&req);req->connector_handle = vx_strdup("c1");req->account_handle = vx_strdup(".issuer-w-dev.mytestaccountname.");req->language = vx_strdup(“en-us”);req->user_uri = vx_strdup("sip:theotheruser@vd1.vivox.com");req->message_body = vx_strdup("Hey there buddy!");int status = vx_issue_request2(&req->base); // If rate limiting is surpassed, status = VxErrorMessageTextRateExceeded

Control messaging rates

Message rates are managed through tokens. The tokens are stored in a bucket to limit how many tokens are available at any given moment. You can make changes to the individual token costs of a message as well as the size of the bucket to control the send rate of messages in your game.

Prelogin key

Expected value and effect

MaxTextMessageSize
The maximum length allowed for a single text message to be sent by the client SDK in bytes. The default is 320.
MaxTextMessageRate
Rate at which users can send messages. The default is 0, meaning there is no limit.
MaxTextMessageBucketSize
Max amount of tokens that will be accumulated. The default value is 5, which means there are a maximum of 5 tokens available.
TextMessageCreditCost
Token cost to send a single message. This is subtracted from MaxTextMessageBucketSize every time a message is successfully sent. The default is 1.
You can use
MaxTextMessageRate
,
MaxTextMessageBucketSize
,
TextMessageCreditCost
together to set a non-integer value for the rate limit. In the following example you can send 2 messages before your bucket is empty, each message costs 3 tokens, and it will take 3 seconds for 3 tokens to be put back into the bucket, therefore it can send at a rate of about 1 message every 3 seconds.
MaxTextMessageRate = 1MaxTextMessageBucketSize = 6TextMessageCreditCost = 3
To modify these settings from their default, reach out to a Vivox representative.

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
    • Control messaging rates


Report a problem with this page
​
​