Client SDK not working in WIX
# support
v
@Ste_k It seems like there might be an issue with the request payload or headers that are being sent when the call button is clicked. A
400 Bad Request
error typically indicates that the server cannot process the request due to a client error, such as incorrect or missing data in the request. Here are a few steps you can take to troubleshoot the issue: 1. **Check the Request Payload**: Ensure that the request payload contains all the necessary information and is formatted correctly. This includes the Assistant ID and any other required fields. 2. **Verify Headers**: Make sure that the headers, especially the
Content-Type
and
Authorization
(which should contain your API key), are set correctly. 3. **Review SDK Initialization**: Double-check that the SDK is initialized with the correct public key. It should match the key provided in the Vapi Dashboard. 4. **Check Network Requests**: Use the browser's developer tools to inspect the network request being made when the call button is clicked. Look for any discrepancies in the request headers or payload. 5. **Consult Documentation**: Review the VAPI documentation to ensure that the call is being made as per the API's expected parameters and endpoint. 6. **Error Handling**: Implement proper error handling in the code to catch and log detailed error messages, which can provide more insight into what might be going wrong. If you've verified all of the above and the issue persists, it might be helpful to provide more details about the request you're making, such as the payload and headers, so that we can assist you further. If sensitive information is involved, please ensure you do not share your API keys or any other confidential information publicly. If you need more specific guidance, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
2 Views