4:44
09/23/2025, 4:53 PMts
<VapiWidget
voiceShowTranscript={true}
onError={(error) => {
console.log("error", error);
}}
onMessage={(data) => {
console.log("on message", data);
}}
mode="voice"
theme="light"
size="tiny"
position="bottom-right"
startButtonText="Start"
endButtonText="End Call"
assistantOverrides={{
variableValues: {
customerName: "John Doe",
},
}}
/>
But when I click on the widget I get the error.
json
message [ "assistant.property assistantId should not exist", "assistant.property assistantOverrides should not exist" ]Vapi Support Bot
09/23/2025, 4:54 PMassistantOverrides in the React SDK widget, you must also provide the assistantId prop. Here’s how you should structure your component:
tsx
<VapiWidget
publicKey="your-public-key"
assistantId="your-assistant-id"
assistantOverrides={{
variableValues: { customerName: "John Doe" },
}}
mode="voice"
// ...other props
/>
Do not use assistantOverrides without assistantId in voice mode, as this will cause the error you saw.
For fully dynamic assistants, use the assistant prop instead and omit both assistantId and assistantOverrides ([see docs](https://docs.vapi.ai/chat/web-widget#use-dynamic-assistant-configuration)).
Source:
- [Web widget documentation](https://docs.vapi.ai/chat/web-widget)4:44
09/23/2025, 4:55 PMChiranjeet Mishra
09/25/2025, 3:17 PMpublicKey and assistantId, or publicKey and assistant configuration. Here's the corrected version:
<VapiWidget publicKey="your-public-key" // Add this - required assistantId="your-assistant-id" // Add this - required unless using assistant prop voiceShowTranscript={true} onError={(error) => { console.log("error", error); }} onMessage={(data) => { console.log("on message", data); }} mode="voice" theme="light" size="tiny" position="bottom-right" startButtonText="Start" endButtonText="End Call" assistantOverrides={{ variableValues: { customerName: "John Doe", }, }}/>
The error you're seeing indicates that you're trying to use assistantOverrides without providing the required assistantId. You must provide:
1. publicKey (required for all cases)
2. Either assistantId or assistant (for voice mode only)
The assistantOverrides can only be used when you provide an assistantId.