Correction: token minting uses ttl_seconds
By Steven Van ·
Deepgram fixes a docs example that silently ignored the token lifetime developers tried to set for Voice Agent API calls.
A correction to Deepgram's Browser Agent SDK docs fixes a copy-paste trap in the token-minting example. The old example posted {"ttl": 30} to POST /v1/auth/grant, but the field is actually named ttl_seconds. Because the endpoint ignores unrecognized fields and still returns 200, a request built from the old example raised no error: it just silently issued a token with the 30-second default, no matter what number was passed in.
The corrected example uses body: JSON.stringify({ ttl_seconds: 30 }). Deepgram notes that a 30-second token is enough for a full call anyway, since it only has to be valid at the WebSocket handshake and the connection stays open afterward. Minting a token still requires an API key with Member permissions or higher.