utkarsh
07/20/2025, 7:30 PMjavascript
vapi.start({
assistantId: "my-assistant-id",
assistant: {
maxDurationSeconds: userAllowedTime
}
});
Issues I'm facing:
1. The maxDurationSeconds override feels like it could be manipulated client-side
2. JWT token expiration doesn't seem to terminate active calls mid-conversation
3. I want to ensure calls are properly cut off when time limits are reached
Questions:
- What's the most secure way to enforce call duration limits per user?
- Should I be creating temporary assistants server-side with predefined maxDurationSeconds?
- Can webhooks help with real-time call termination, or do they only fire after calls end?
- Is there a recommended pattern for this type of time-based access control?
I'm using the MERN stack on the backend if that matters for webhook implementation.
Any guidance on best practices would be hugely appreciated! 🙏Kings_big💫
07/21/2025, 3:18 PMutkarsh
07/21/2025, 7:12 PMKings_big💫
07/21/2025, 8:07 PM