The following example highlights how a developer might use the VIVEPORT Session Token API in their title.
Make sure you have a VIVEPORT ID and Key for your title before trying to implement any of the API functions.
Call the Top Level API using
Viveport.Api.Initto initialize the VIVEPORT SDK. For Unity developers, this is typically called as Monobehavior
Token.IsReady()to initialize the Session Token API.
GetSessionToken()to get a session token. The token is passed by the message of
- Use the token for authentication, such as with Photon VIVEPORT integration .
Viveport.Api.Shutdownto release VIVEPORT SDK resources when no longer needed. In Unity, this is typically either in MonoBehavior
Important : You will need credentials and configuration for third-party server authentication, such as using your own server for multiplayer or networking. For details, please see authentication with third-party servers .