Documentation

Support

Vivox Unity SDK

Vivox Unity SDK

Access token payload

Understand the payload section of a Vivox Access Token.
Read time 2 minutesLast updated 2 days ago

The payload is a base64url-encoded JSON object that contains the claims asserted by the token. You can list claims in the payload in any order. The following table details the claims that you can use in a token. For more information on which parameters are required for each token, see Access token examples.

Unity Authentication IDs within payloads

If your application is using Unity Authentication Service to authenticate players, you can use the UAS ID within a Vivox access token to ensure proper player identity. SIP URIs, which are used to identify players, must be in the proper format to ensure that the player ID is parsed from the full SIP URI. This format is mandatory for using any Unity Moderation service with VATs. The following is an example of the expected SIP format:
sip:.issuer.unity_player_id.unity_environment_id.@domain.vivox.com
Note: It's the
f
,
t
, and
sub
fields that will need to include the Unity environment ID, shown in the format below, to work with UAS.
ClaimExample valueDescription
vxi1Guarantee token uniqueness. If all other claims are identical, this must be different or the token could be rejected as already used. Note: It's recommended that you use an unsigned integer that is increased by 1 for every token that is generated.
sub
sip:[.blindmelon-AppName-dev.jerky.@tla.vivox.com](mailto:.blindmelon-AppName-dev.jerky.@tla.vivox.com)
The subject. A user SIP URI that is used for mute and kick actions. This is the user who is muted or unmuted, or the user who is kicked.
f
sip:[.blindmelon-AppName-dev.beef.@tla.vivox.com](mailto:.blindmelon-AppName-dev.beef.@tla.vivox.com)
From. This is a user SIP URI that is used in all actions. This is the user who performs actions such as signing in, joining the channel, or muting another user.
iss
blindmelon-AppName-dev
An application-specific issuer. The issuer is provided when you create an application on the Unity Dashboard.
vxakickA Vivox action. For more information, see Supported values for the Vivox action claim.
t
sip:[confctl-g-blindmelon-AppName-dev.testchannel@tla.vivox.com](mailto:confctl-g-blindmelon-AppName-dev.testchannel@tla.vivox.com)
To. This is a channel SIP URI that is used in join, mute, kick, and transcription actions. This is the channel where the action takes place.
exp1600349400The expiration time as epoch seconds. This value is usually the current time plus 90 seconds.