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 } }] 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.
v
Could you please check if the authentication details are correctly configured and up-to-date? Incorrect or expired credentials can prevent the API call from being triggered. Additionally, have you verified that the parameters being passed, such as
toolCallId
, are correctly formatted and included in the request? This can also affect the API call execution. Lastly, have you reviewed any network configurations or firewall settings that might be blocking the request? These are common issues that can prevent API calls from being sent. Let me know if you need more detailed guidance on any of these points! 😊 Sources: - [Common Issues Preventing API Call Triggers](https://discord.com/channels/1211482211119796234/1211483291191083018/1325000684231196775) - [Debugging API Call Failures in VAPI](https://discord.com/channels/1211482211119796234/1211483291191083018/1336456720913797238)
p
@Vapi Support Bot but there are no logs indicating that the API request was ever made.
v
It sounds like you're facing a tricky situation with your API call not being triggered at all. Since there are no logs indicating that the request was made, here are a few steps you can take to debug the issue: 1. **Verify Endpoint and URL**: Double-check that the URL specified in your setup is correct and accessible. Ensure there are no typos or misconfigurations. 2. **Check Authentication Details**: Make sure that any required authentication tokens or keys are correctly configured and not expired. Incorrect credentials can prevent the API from being called. 3. **Parameter Formatting**: Ensure that the parameters, especially
toolCallId
, are correctly formatted and included in the request. If they are missing or incorrectly structured, the API call may not execute. 4. **Network and Firewall Settings**: Review any network configurations or firewall settings that might be blocking the request. Sometimes, local network restrictions can prevent outgoing API calls. 5. **Testing with Simplified Requests**: Try creating a simplified version of your API call to see if that works. This can help isolate whether the issue is with the setup or the specific function call. If you've checked all these points and the issue persists, it might be helpful to reach out to VAPI support for further assistance. They can provide insights based on their logs and system behavior. Let me know if you need more detailed guidance on any of these steps! 😊 Sources: - [Common Issues Preventing API Call Triggers](https://discord.com/channels/1211483291191083018/1325000684231196775) - [Debugging API Call Failures in VAPI](https://discord.com/channels/1211483291191083018/1336456720913797238)
p
@Vapi Support Bot can you please guide me more how to implement this toolCallId as docs are not that clear
v
To implement the
toolCallId
parameter in your VAPI function calls, follow these guidelines: 1. **Understanding `toolCallId`**: The
toolCallId
is a unique identifier that helps match responses with their corresponding tool calls. It ensures that the context is preserved during interactions. 2. **Include
toolCallId
in Your Request**: When you make a request to your API, ensure that the
toolCallId
is included in the parameters. Here’s an example of how your request should look:
Copy code
json
   {
       "toolCallId": "your_unique_tool_call_id"
   }
3. **Response Format**: Your API should return a response that includes the
toolCallId
to confirm that the request was processed correctly. The response format should look like this:
Copy code
json
   {
       "results": [
           {
               "toolCallId": "your_unique_tool_call_id",
               "result": "Current time fetched successfully."
           }
       ]
   }
4. **Ensure Correct Matching**: Make sure that the
toolCallId
you send in the request matches exactly with the one you return in the response. If they don’t match, VAPI won’t be able to associate the response with the correct call. 5. **Testing**: After implementing, test your function call to ensure that the
toolCallId
is being passed correctly and that the API is responding as expected. If you follow these steps and ensure that your
toolCallId
is correctly implemented, it should help in successfully triggering your API call. If you have any further questions or need more specific examples, feel free to ask! 😊 Sources: - [Implementing Function Calls in VAPI](https://discord.com/channels/1211483291191083018/1296705973737488505) - [Detailed Report on Implementing the
toolCallId
Parameter in VAPI Function Calls](https://docs.vapi.ai/tools/custom-tools)
p
@Vapi Support Bot anyway if i am not sending toolCallId, server logs should have logs indicating that the API request was ever made. i am not getting that 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!
e
Hi I am getting error for my API call ,it is triggered but only getting GET Method {"id":"3915ad95-b9ef-4db7-a306-ce9c74146146","createdAt":"2025-03-04T00:31:19.777Z","updatedAt":"2025-03-04T00:31:19.777Z","type":"function","function":{"name":"updaters","description":"Stores or updates a value in Redis.","parameters":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"messages":[{"type":"request-start","content":"Updating Redis data..."},{"type":"request-complete","content":"Redis updated successfully!"},{"type":"request-failed","content":"Failed to update Redis."}],"orgId":"adeacfd3-6364-4943-825f-b24433b25ed4","server":{"url":"https://users.dedyn.io:8000/update-redis","timeoutSeconds":20,"headers":{"Content-Type":"application/json","X-HTTP-Method-Override":"POST"}},"async":true}%
This is the message by bot to use tool { "role": "tool_calls", "time": 1741086931286, "message": "", "toolCalls": [ { "id": "call_ka39", "type": "function", "function": { "name": "update_redis", "arguments": "{\"key\": \"Problem\", \"value\": \"पानी की दिक्कत\"}" } } ], "secondsFromStart": 37.068 } but still it is not working Tool_id dcd3ce6d-7191-488d-b196-ce2e009d55a5
@Shubham Bajaj
@Sahil
@VAPI Tech
@User
Can anybody help me I am not getting proper HTTP request to my server need to investigate why this is happening and the tool documentation is not clear
This is the TCP DUMP
Can anybody please help me @Sahil @Shubham Bajaj @User @Vapi
Is there a tech support team available?
@Sahil
@Shubham Bajaj
@User
@Vapi
7:23:37:224 [ERROR] tool-calls Server URL Error: write EPROTO C08CB588527F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:
getting this in the logs
s
Hey @EinNot your getting response because this ticket is not owned by you and eventually this never reaches out to us,
@EinNot Really sorry but please create a new support ticket so I can ann\swer you.
2 Views