Unable to connect to VAPI assistant from a react n...
# support
p
I am trying to make a connection with a pre-defined assistant in VAPI to start an audio conversation from a react-native/EXPO iOS app using client-sdk-react-native. I am sending vapi api key through header and assistant ID through request body but I am getting 400 - Internal server error for the vapiClient.start() call. I am calling the vapiClient method with the following configuration: {"assistantId": "XXXXXXXXXXXXX", "recordingEnabled": true, "transcriber": {"language": "en-US", "model": "nova-2", "provider": "deepgram"}} Any insight on why the start() call is failing? Thanks
v
Verify that your app has the necessary microphone permissions. Even if logs indicate "Mic Permission Granted," the VAPI SDK might still report "No Microphone Permission," resulting in errors. Is there any additional information you can provide about the error, such as specific error messages or logs that might help narrow down the issue? Sources: - [Causes of 400 Internal Server Error with vapiClient.start()](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1328923059905630238) - [Common errors when using vapiClient.start() method](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1325000684231196775) - [Connecting to VAPI assistant from react-native/Expo iOS app using client-sdk-react-native](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1239945056937443510) - [Common errors when connecting to VAPI assistant from react-native/Expo iOS app using client-sdk-react-native](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1328595920899674152) - [VAPI transcription configuration options and requirements](https://docs.vapi.ai/api-reference/assistants/create-assistant)
Hi there! 👋 I'm unable to determine the exact cause of your specific 400 Internal Server Error without more details about your implementation or error logs. However, I can help with some common issues that might be causing this problem with your
vapiClient.start()
call. Based on the information I found, here are some potential causes for the 400 Internal Server Error you're experiencing: ## API Key Issues Make sure your API key is correct and has the proper permissions. The error might occur if there's an issue with authentication. The API key should be passed in the authorization header as
Authorization: Bearer YOUR_API_KEY
according to the [VAPI documentation](https://docs.vapi.ai/api-reference/assistants/create-assistant). ## JSON Formatting Issues Ensure your request body is properly formatted. Incorrect JSON formatting can cause 400 errors when calling
vapiClient.start()
. ## Transcription Configuration Regarding your transcription configuration: - While you've specified
"language": "en-US"
, according to the documentation, VAPI's call language recognition is automated, so you may not need to set it explicitly. - The "nova-2" model from Deepgram is supported, but make sure it's compatible with your specific use case. ## Expo SDK Version Compatibility There might be compatibility issues with your Expo SDK version. According to information I found, VAPI RN requires Expo SDK 50 currently. If you're using a different version, consider downgrading to Expo SDK 50, clearing the Metro bundler cache, and rebuilding your app. ## Network Connectivity Issues Ensure your device has proper network access and can reach the VAPI servers. Firewalls or network restrictions could be blocking the connection. ## Server URL Configuration Check if a server URL is required for your assistant to know where to send and receive data. This might need to be configured in the VAPI dashboard. ## Microphone Permissions
p
Hey Phantom, for SDK related issues, you have to report them over github.
v
Message marked as helpful by @phantom! 🎉
p
I confirmed that the app has the necessary microphone permissions. I am referring to the following repository. Is that correct? https://github.com/VapiAI/client-sdk-react-native
Hi Shubham, Is this the correct github repository? https://github.com/VapiAI/client-sdk-react-native Thanks,
s
Yes, this is the correct data repository related to React Native