rate limit
# support
l
Hi, I’m using VAPI as a web snippet/web SDK, and I’m concerned about protecting it from abuse. Specifically, I want to prevent scenarios where someone might create a script to spam the agent. Could you advise on the best practices or built-in features to mitigate this risk? Thank you for your support.
v
@LAwLessLy Hello! I'm glad to hear you're using VAPI for your voice applications. Protecting your service from abuse is indeed a critical concern. Here are some best practices and features you might consider to mitigate the risk of spam: 1. **Authentication**: Ensure that all API requests are authenticated. Use tokens or API keys and validate them on the server side. 2. **Rate Limiting**: Implement rate limiting on your API endpoints to control the number of requests a user can make in a certain time frame. 3. **CAPTCHA**: Integrate CAPTCHA challenges in scenarios where automated scripts might be used, such as during user registration or when accessing sensitive features. 4. **Monitoring and Alerts**: Set up monitoring on your endpoints to detect unusual patterns of activity and configure alerts so you can respond quickly to potential abuse. 5. **Logging**: Keep detailed logs of user activity. In the event of abuse, logs can help you understand the scope and potentially identify the abuser. 6. **User Education**: Educate your users about secure practices, such as not sharing their API keys or other credentials. 7. **Access Controls**: Implement fine-grained access controls to limit what authenticated users can do, based on their role or other criteria. 8. **Web Application Firewall (WAF)**: Use a WAF to help protect your web applications from various attacks, including bots and other automated systems. 9. **Input Validation**: Always validate user input to ensure it meets the expected format and contains no malicious content. If VAPI has specific features or configurations for these aspects, they would typically be detailed in the API Reference or the Documentation section. If you need more detailed guidance on implementing these features with VAPI, please let me know, and I can provide further assistance or direct you to the support team for more info on this.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
s
@LAwLessLy You can use a public key for your web calls and associate it with a list of domains and/or assistants. Regarding rate limiting for your users or devices, you should implement it at the application level, preferably using a combination of browser IP, user ID, etc. Let me know what do you think.
l
Sorry for the late response, I'm not regularly on Discord and was not messaged. Isn't there an already built solution from you to easily handle the backend logic instead of creating fully from scratch, with the risk of unsafe software? You know, I need to focus on the main work that matters for me. I mean, when there are already frameworks, why reinvent it?
s
@LAwLessLy As of now, we don't have this feature built yet. I apologize for this. I can help you build a complete solution and get things done, or I can raise a feature request on your behalf. Just to let you know, there wasn't enough user demand for this feature, so it was never built or requested. Please let me know your thoughts on this.
6 Views