When joining a Vivox channel with an Access Token, the channel may disconnect before fully connecting due to incorrect token claims, especially in positional channels. Updating to newer Vivox SDK versions (Unity 16.2.0 or 15.1.230000-pre.1) provides clearer error messages like "Access Token Claims Mismatch, 20123." Best practice is to generate token identifiers using SDK methods rather than manually constructing SIP URIs to ensure proper formatting.
Symptoms:
When joining a channel using a Vivox Access Token (VAT), the channel state transitions from "Connecting" to "Disconnecting" and finally to "Disconnected" without ever entering the "Connected" state. This often occurs without a clear error message being logged by the application, making it difficult to diagnose.
This is especially common when attempting to join Positional channels, as the channel identifier encodes precise 3D properties that are easy to misconfigure.
Resolution:
This issue is typically caused by incorrect claims in the Vivox Access Token. While some older SDK versions did not surface a specific error, newer versions will help identify the problem more clearly.
1. Update the Vivox SDK
If you're using Unity, ensure you are using a modern version of the Vivox SDK to get more detailed error information. The "Access Token Claims Mismatch, 20123" error message is displayed starting with the following Vivox SDK versions:
- Unity 16.2.0
- Unity 15.1.230000-pre.1
2. Generate Token Identifiers Using SDK Methods (Best Practice)
The most reliable way to prevent token claim mismatches is to avoid manually constructing SIP URIs. Instead, use the methods provided by the Vivox SDK to generate the correct URIs for your token claims. This is the recommended best practice and ensures that all required properties, including those for positional channels, are correctly formatted.
Refer to the following guide for best practices guidance specific to each SDK type on how to obtain token-ready SIP URI strings for use in sub, f, and t claims fields: How to access SIP URIs for Vivox Access Token generation.
More Information: