文档

​
​

Development

User Acquisition

Monetization

工业

Vivox Unreal SDK

Vivox Unreal SDK

此页面不支持所选语言。
Vivox
​
​
Vivox Unreal SDK
  • Overview
  • Get started
  • Release notes
  • Developer guide
  • Tutorials
  • Reference
    • Vivox Core Unreal class model overview
    • Vivox Unreal conventions
    • Unreal API Reference Manual
    • Access Token Developer Guide
      • Access token terminology
      • Requests that require access tokens
      • Access token identifiers
      • Access token format
      • Access token examples
      • Generate a token on the client
      • Generate a token on a secure server
      • Key update API
      • Access token error codes
    • Server to Server Web API Reference Guide
    • Third-party license information
  1. Vivox Unreal SDK documentation

Generate a token on the client

Generate Vivox Access Tokens on the client.
阅读时间1 分钟
最后更新于 6 个月前

重要
Use the following access token generation methods during initial development and prototyping. Do not include this method of generation in production builds of your game. Allowing token generation on the client during production is both a security risk and can cause unexpected token expiration errors for your users.
The following APIs are available to generate insecure access tokens from the client for use during early development:
  • IChannelSession::GetConnectToken()
  • IChannelSession::GetTranscriptionToken()
  • ILoginSession::GetLoginToken()
  • IParticipantProperties::GetMuteForAllToken()
Each API takes the following parameters:
  • The token signing key
  • The token time to live in seconds
The following examples display access tokens for login and join, respectively:
const TCHAR *kKey = TEXT("demo-key");const FTimespan kExpiration = FTimespan::FromSeconds(90);// Login (This assumes an already initialized Client object)ILoginSession &loginSession(client.GetLoginSession(/* Account to login */));loginSession.GetLoginToken(kKey, kExpiration);// Join (This assumes an already signed in ILoginSession object)IChannelSession &channelSession(loginSession.GetChannelSession(/* ChannelId to join*/));channelSession.GetConnectToken(kKey, kExpiration);// Mute (This assumes an already signed in ILoginSession object joined to a Connected IChannelSession)IChannelSession &channelSession(loginSession.GetChannelSession(/* ChannelId to mute in*/));IParticipant &participant(channelSession.Participants()[ParticipantKey]);participant.GetMuteForAllToken(kKey, kExpiration);// Transcription (This assumes an already signed in ILoginSession object joined to a Connected IChannelSession)IChannelSession &channelSession(loginSession.GetChannelSession(/* ChannelId to begin transcribing*/));channelSession.GetTranscriptionToken(kKey, kExpiration);

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。


    报告此页面的问题