기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

Vivox Unity SDK

Vivox Unity SDK

Vivox
​
​
Vivox Unity SDK
  • Overview
  • Get started
  • Release notes
  • Developer guide
  • Tutorials
    • Implement Vivox Unity
    • Access Token Developer Guide
      • Access token terminology
      • Requests that require access tokens
      • Access token identifiers
      • Access token format
      • Access token examples
      • Generate a token from the client
        • Authentication-based token generation
        • Interface implementation-based token generation
      • Generate a token on a secure server
      • Key update API
      • Access token error codes
  • Reference
  1. Vivox Unity SDK 기술 자료

인터페이스 구현 기반 토큰 생성

How to generate access tokens using an interface implementation.
읽는 시간 2분
최근 업데이트: 8달 전

VAT(Vivox 액세스 토큰) 생성 방법을 제어하려면 Vivox SDK의
IVivoxTokenProvider
인터페이스를 구현하는 클래스를 생성하고 이를 VivoxService에 등록합니다.
VivoxService.Instance.SetTokenProvider
를 호출하여 IVivoxTokenProvider 구현을 등록하면 Vivox는 로그인과 같은 작업에 토큰이 필요할 때마다 구현의
IVivoxTokenProvider.GetTokenAsync
메서드를 호출합니다.
페이로드를 생성하는 데 필요한 정보는 오버라이드된
IVivoxTokenProvider.GetTokenAsync
메서드에 대한 입력으로 제공됩니다. 이 정보는 VAT를 작성할 때 사용됩니다.
여전히 서버 측 토큰 제공을 설정하고 오버라이드된
IVivoxTokenProvider.GetTokenAsync
메서드 내에서 토큰을 가져와야 합니다.

구독하기

다음과 같이
IVivoxTokenProvider
구현을 등록한 후 사용자를 로그인해야 합니다.
VivoxService.Instance.SetTokenProvider(new CustomTokenProvider());
중요
중요: v16.5.0에서 구독 플로가 변경되었습니다. Unity Vivox SDK 16.5.0 이전 버전에서는
IVivoxTokenProvider
구현을 등록한 후 Vivox SDK를 초기화해야 합니다.

토큰 가져오기

일부가 비어 있더라도 오버라이드된 메서드에 제공된 모든 파라미터를 사용하여 페이로드를 생성하고 이를 보안 서버로 보내 Vivox 액세스 토큰을 생성합니다. 가장 좋은 방법은 모든 파라미터를 보내는 것입니다. 페이로드에 필요한 것만 반환됩니다. 페이로드를
GetTokenAsync
메서드에 대한 입력으로 사용합니다.
특정 토큰의 경우 다른 파라미터가 비어 있습니다. 예를 들어 로그인 토큰의 경우 targetUserUri와 channelUri는 비어 있습니다. 이는 예상된 동작입니다.
다음은 토큰 생성 예제입니다.
public class VoiceManager : MonoBehaviour{ async void Start() { // Must be done before any other Vivox action otherwise tokens will not be generated properly. VivoxService.Instance.SetTokenProvider(new VivoxTokenProvider()); await UnityServices.InitializeAsync(); await VivoxService.Instance.InitializeAsync(); }}class VivoxTokenProvider : IVivoxTokenProvider{ public Task<string> GetTokenAsync(string issuer = null, TimeSpan? expiration = null, string targetUserUri = null, string action = null, string channelUri = null, string fromUserUri = null, string realm = null) { // Implement token fetching logic here. // The method parameters contain the necessary information for crafting the request payload. // This will be called whenever a token is needed for a Vivox action }}
이 특정 플로에 대한 자세한 내용은 Vivox 액세스 토큰으로 로그인을 참고하시기 바랍니다.
서버 측 토큰 생성에 대한 자세한 내용은 보안 서버에서 토큰 생성을 참고하시기 바랍니다.

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • 구독하기

    • 토큰 가져오기


이 페이지의 문제 보고