API Not Being Called During Call
# support
p
I'm integrating VAPI and trying to call an API to fetch the current time, but it is not being triggered during the call execution. Here’s my current setup: The assistant is supposed to call an external API via a tool function (get_current_time). The function is defined with the necessary parameters and response messages. However, during the call, this API is not being triggered at all—there are no logs or indications that the request is even sent. Could someone help me debug this? Here’s my setup: "tools": [{ "type": "function", "messages": [ { "type": "request-start", "content": "Fetching the current time..." }, { "type": "request-complete", "content": "Current time fetched successfully." }, { "type": "request-response-delayed", "content": "There is a delay in fetching the current time.", "timingMilliseconds": 2000 } ], "function": { "name": "get_current_time", "description": "Fetch the current server time in ISO format", "parameters": { "type": "object", "properties": { "toolCallId": { "type": "string", "description": "Unique identifier for tracking tool calls" } } } }, "async": false, "server": { "url": URL } }]
v
Could you please verify if the URL in your setup is correctly specified and accessible? Also, are there any error messages or logs on the server side that might indicate why the API call isn't being triggered? Checking these details can help us pinpoint the issue more effectively. Additionally, ensure that the toolCallId is being correctly generated and passed in the request. Sources: - [Common Issues Preventing API Calls in VAPI](https://discord.com/channels/1211482211119796234/1211483291191083018/1336345690393149452) - [Debugging API Calls in VAPI](https://discord.com/channels/1211482211119796234/1211483291191083018/1335336931395108895) - [Best Practices for Setting Up Tool Functions in VAPI](https://discord.com/channels/1211482211119796234/1211483291191083018/1335141023600480318)
p
I have verified that the URL is correct and accessible, but the API is still not being called during the call execution. I checked the server logs, and there are no logs indicating that the API request was ever made.
I have verified that the URL is correct and accessible, but the API is still not being called during the call execution. I checked the server logs, and there are no logs indicating that the API request was ever made.
s
Hey! To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help us figure out what went wrong!