I am encountering a Runtime Error with the message...
# support
s
I am encountering a Runtime Error with the message [400] Bad Request while executing a scenario in my workflow that integrates with Vapi. The scenario involves Google Sheets, an array aggregator, an iterator, and a final step where the issue occurs during the "Create an Outbound Phone Call" operation using Vapi. Here are the details of the issue: Error Type: Runtime Error Error Code: [400] Bad Request Origin of the Error: Vapi Scenario Steps: Fetch data from Google Sheets. Aggregate rows into an array. Iterate over the array. Set variables using the Tools module. Attempt to create an outbound phone call via Vapi (error occurs at this step). I have double-checked the data mapping, but the issue persists. Could you kindly assist in identifying the root cause of this error? @User @User https://cdn.discordapp.com/attachments/1313089102631014400/1313089491241533471/Vapi.png?ex=674edd62&is=674d8be2&hm=e777c2a57d1358259a32c2eb66b2a686698f9cbfb57678b78c770688ad086981&
v
@Shahzeb Absolutely, I'd be glad to help you troubleshoot the issue you're experiencing with Vapi during the "Create an Outbound Phone Call" operation. A [400] Bad Request error typically indicates that the information sent to the API was incorrect or incomplete. Here are a few things you can check to resolve this issue: 1. **API Credentials**: Ensure that the API credentials used for Vapi are correct and have the necessary permissions. 2. **Phone Number Format**: Verify that the phone numbers you are trying to call are in the correct format required by Vapi. They often need to be in E.164 format, which includes the country code and does not contain any special characters or spaces. 3. **Required Parameters**: Make sure all required parameters for the "Create an Outbound Phone Call" operation are provided and correctly formatted. This includes the destination phone number, the caller ID, and any other mandatory fields. 4. **Optional Parameters**: If you are using optional parameters, ensure they are supported by Vapi and are correctly formatted. 5. **Data Mapping**: Since you're using an iterator, confirm that the variables set using the Tools module are correctly mapped and passed to the Vapi call operation. 6. **API Rate Limits**: Check if you might be hitting any rate limits that could cause the API to reject additional requests. 7. **API Endpoint**: Ensure that you are hitting the correct API endpoint for creating an outbound call. If you've gone through these checks and the issue still persists, it might be helpful to look at the exact payload being sent to Vapi to identify any discrepancies. If you can provide more details about the payload or the error message, I can offer more specific advice. If you're unable to resolve the issue with this information, please ask support for more info on this. They can provide detailed logs and guidance specific to your scenario.
You can continue this conversation by mentioning me in the message.
s
@Shahzeb your getting 400 bad request means your sending wrong payload for the API call. Can you share the payload your trying to send in a loom video?
15 Views