Configure Auth Token mode
Switch a Convai Unity SDK project to Auth Token mode and configure the token endpoint in Project Settings for a shipped build.
Configure Auth Token mode so a player build resolves a short-lived credential from your backend instead of shipping the Convai account API key. Use this page when you have a token endpoint ready, or when you are configuring a public token endpoint directly in Project Settings.
Prerequisites
A Convai Unity SDK project with an API key already saved, so the Editor can keep working while you configure Auth Token mode.
An HTTPS endpoint on your backend that returns a short-lived Convai auth token, unless you plan to use a code-based
IConvaiAuthTokenProviderinstead.
Switch to Auth Token mode
Project Settings headers are static and ship inside the player build. Never put a player token, refresh token, server secret, or Convai API key into the Request Headers list. If your token request needs a per-player credential, use a registered IConvaiAuthTokenProvider instead — see Write a custom token provider.
Verify the configuration
Enter Play mode with a scene that connects a ConvaiCharacter. A successful connection confirms the endpoint returned a valid token under the configured response field. If the connection fails, check the Console for the exact error message and see Troubleshoot authentication.
Your saved API key remains available to Editor tools after switching to Auth Token mode, but both stored key fields are cleared automatically while an Auth Token player build is produced, and restored afterward.
Next steps
Last updated
Was this helpful?