Facing error when trying to use Websocket transpor...
# support
y
When I trigger this API for a websocket call:
Copy code
curl --location 'https://api.vapi.ai/call' \
--header 'authorization: Bearer 90947ae3-94ca-46d2-a4a5-b7665912f759' \
--header 'content-type: application/json' \
--header 'Cookie: _cfuvid=s3GI9uVVCtYM7jKZAx106nOLCnP2xvmj5AHoWQdyJBI-1746269265225-0.0.1.1-604800000' \
--data '{
    "assistantId": "d539f5aa-59bc-4a2f-9fbd-b0a349010c2d",
    "transport": {
      "provider": "vapi.websocket"
    }
  }'
This is the response that I get:
Copy code
{
  "transport": {
    "provider": "vapi.websocket",
    "websocketCallUrl": "wss://phone-call-websocket.aws-us-west-2-backend-production1.vapi.ai/0f80953a-2a98-4150-9d7a-1cd093e318c1/transport"
  },
  "assistantId": "d539f5aa-59bc-4a2f-9fbd-b0a349010c2d",
  "id": "0f80953a-2a98-4150-9d7a-1cd093e318c1",
  "orgId": "c7eeddf1-2236-4c47-9505-cf0c1dfa66b4",
  "createdAt": "2025-05-03T10:47:45.085Z",
  "updatedAt": "2025-05-03T10:47:45.085Z",
  "type": "vapi.websocketCall",
  "status": "queued"
}
But when connecting the websocketCallUrl, it returns 500 internal server error (see the attached screenshot), can you please help me with this? https://cdn.discordapp.com/attachments/1368180917872492606/1368180918287863891/Screenshot_2025-05-03_at_4.19.07_PM.png?ex=68174946&is=6815f7c6&hm=cae700de262cfaa8d9491a51ae4e9ade54fc3141e623f2245ccf48bf14706927&
v
Since you're getting a 500 Internal Server Error (server-side issue), try these steps: 1. Retry the request - Sometimes these errors are temporary 2. Check URL validity - Ensure the websocket URL hasn't expired (they're often valid for only a short time) 3. Establish connections in order - First connect to
/transport
then to
/listen
as the listen endpoint expects the transport connection to be established first If the issue persists, contact Vapi support with your error details and timestamp. Sources: - [Discord discussion about websocket transport issues](https://discord.com/channels/1211482211119796234/1341810370700120064) - [Discord discussion about 500 errors](https://discord.com/channels/1211482211119796234/1328923059905630238) - [Discord discussion about websocket URL validity](https://discord.com/channels/1211482211119796234/1329235631855108128)
s
y
I did try that @Sahil! Using the curl (Create a websocket call) from the docs, I received this error:
Copy code
{
  "message": [
    "assistant.property assistantId should not exist",
    "transport.audioFormat.an unknown value was passed to the validate function"
  ],
  "error": "Bad Request",
  "statusCode": 400
}
Then I removed the audioFormat object, and replaced
"assistant": { "assistantId": "d539f5aa-59bc-4a2f-9fbd-b0a349010c2d" },
with
"assistantId": "d539f5aa-59bc-4a2f-9fbd-b0a349010c2d"
This worked fine. But when I tried to connect to the wss endpoint, it returned "Internal Server Error" (See the screenshot attached in the previous message) https://cdn.discordapp.com/attachments/1368180917872492606/1368289992857751613/Screenshot_2025-05-03_at_11.41.32_PM.png?ex=6817aedb&is=68165d5b&hm=69bac4c5ab8523f25112302f37dede20e5d0f50849fc8356488771b714b38c1c& https://cdn.discordapp.com/attachments/1368180917872492606/1368289993226715266/Screenshot_2025-05-03_at_11.43.40_PM.png?ex=6817aedb&is=68165d5b&hm=10802100cab43829748fa9b50f1da169fb58a55ad356ac2fd8fd0a2d324f6350&
s
Looks like a bug cause ideally we need to provide the audioFormat otherwise it will not work.
y
Yes @Sahil, because as per the docs, it looks straightforward. Can you get it checked once and let me know the next steps?
s
Sure, give me some time. Today is sunday so most of the folks are offline.
Will get back to you soon.
y
No problem, Thanks
Any updates on this @Sahil ?
s
They are on PST Timezone, but we will working on it.
y
Thanks for the info @Sahil
b
Any update ?
c
Hey @bauman you can track it over here
y
It's been more than 10 days, any updates on this? @Sahil @Shubham Bajaj
c
Hey Yash, we’ve got quite a bit going on right now, and honestly, we’re not seeing many complaints about this. So, it’s going to take a little longer.
2 Views