I’m currently on the Indie Dev plan and integrating Convai’s voice features into a web application using the convai-web-sdk
. Everything works well in development, but I’ve run into a security concern.
Right now, the SDK requires me to pass in my personal API key like this:
convaiClient.current = new ConvaiClient({
apiKey: "your-api-key",
characterId: "your-character-id",
enableAudio: true
});
This setup is fine for local development, but I obviously can’t expose my personal API key when deploying the frontend publicly.
Is there a recommended way to securely use the Web SDK in production? For example:
- Can I generate temporary or limited-scope API keys for users?
- Is there a backend authorization flow you suggest for this use case (maybe upgrade to another plan or use another sdk)?
I’d really appreciate any guidance on how to keep my web app secure while leveraging Convai’s functionality effectively.