文档

​
​

Development

User Acquisition

Monetization

工业

Vivox Core SDK

Vivox Core SDK

此页面不支持所选语言。
Vivox
​
​
Vivox Core SDK
  • Overview
  • Before you begin
  • Get started
    • Integration guide
    • Quick start guide
      • Initializing Vivox
      • Logging in
      • Assign a unique username
      • Generate a login access token
      • Submit a login request
      • Joining and leaving channels
      • Generate and submit a join token
      • Process join responses and events
      • Handle join errors
  • Release notes
  • Developer Guide
  • Reference
  • Privacy overview
  1. Vivox Core SDK documentation

Generate and submit a join token

How to form and submit a join token on a game server.
阅读时间2 分钟
最后更新于 8 个月前

To generate a join token, follow the same process that was introduced in Generate a login token.
The part you will change is the payload portion of the token.

Join token - Payload

You can re-use the same serializable class you crafted earlier for use in login tokens to craft the payload for a join token. The two key differences are a different Vivox Action: Join, and the use of the To (t) field.

Explanation

Example claims object

N/Apublic class Claims {
N/Apublic string iss {get;set;}
N/Apublic int exp {get;set;}
Vivox Actionpublic string vxa {get;set;}
N/Apublic int vxi {get;set;}
N/Apublic string f {get;set;}
“To” channel to joinpublic string t {get;set;}
N/Apublic string sub {get;set;}
}

Example join token

Claims loginClaim = new Claims{iss=testgames1234-aa12,vxi = 93000,vxa:join,exp=1600349400,f=sip:.testgames1234-aa12.030104_16.@tla.vivox.com,t=sip:confctl-g-testgames1234-aa12.1M2n31IoU45b.t1@tla.vivox.com};

Submit a join request

Vivox has structures to store a common set of parameters to many different request types. Utilize this in your next step, which is to craft your request, and issue it to the Vivox SDK to be sent to Vivox services.
Create your join request in your game client and store any necessary parameters and the
access_token
received from your game server.
vx_req_sessiongroup_add_session *req;vx_req_sessiongroup_add_session_create(&req);req->sessiongroup_handle = vx_strdup("sg1");req->session_handle = vx_strdup("1M2n31IoU45b.t1");req->uri = vx_strdup("sip:confctl-g-testgames1234-aa12.1M2n31IoU45b.t1@tla.vivox.com");req->account_handle = vx_strdup("sip:.testgames1234-aa12.playerName@mt1s.vivox.com");req->connect_audio = 1;req->connect_text = 1;req->access_token = vx_strdup(_the_access_token_generated_by_the_game_server);
Issue the request to the Vivox SDK from the game client.
vx_issue_request3(&req ->base, &request_count);

Reminders

  • Do not send identifiable playerName(s) to Vivox.
  • session_handle
    must be unique across your entire game.
Next step, process join responses and events.

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

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

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

  • 在本页上
    • Join token - Payload

      • Example join token

    • Submit a join request

      • Reminders


报告此页面的问题