Tier 1: API Key
Your API key is used to authenticate your requests to the Anam API. It is a secret key that is used to sign your requests and is stored on your server.Never expose your API key on the client side. It should only exist in your
server environment.
Getting Your API Key
See the API key page for details on how to get your API key from the Anam Lab.Tier 2: Session Tokens
Session tokens are temporary credentials that allow your client applications to connect directly to Anam’s streaming infrastructure while keeping your API keys secure.How Session Tokens Work
1
Token Request
Your server requests a session token from Anam using your API key and
persona configuration
2
Token Generation
Anam generates a temporary token tied to your specific persona configuration
3
Client Connection
Your client uses the session token with the Anam SDK to establish a direct
WebRTC connection
4
Real-time Communication
Once connected, the client can send messages and receive video/audio streams
directly
Basic Token Creation
Below is a basic express server example that exposes a single endpoint which a client application can use to create a session token.server.js