vicious-gold
vicious-gold7h ago

Unable to enable "transcripts" for server messages

Hi there! I created a website and am trying to integrate vapi as an AI assistant. I need my website to display the transcript from my vapi calls and am having issues with that. I noticed that in the assistant's Server Messages settings, "transcript" and "transcript final" were not checked. Upon checking them, I was met with an undefined message. It looks like I was still able to save these changes but my transcript still wasn't sending to my Supabase database + server URL, and I wasn't sure if its because these 2 values are still undefined. How do I fix this? Vapi's AI told me to update the assistant by sending a PATCH request to: https://api.vapi.ai/assistant/6ee0e0ec-a330-4766-b513-715104e70a24 but this did not work. Example Call ID: 22a8cabc-06ee-4a9d-b610-9fc74ac2b0d9 Thank you!
No description
5 Replies
Vapi
Vapi7h ago
To fix the validation error, ensure you are sending the correct value for serverMessages in your PATCH request. Use "transcript" or transcript[transcriptType="final"] exactly as shown below:
{
"serverMessages": [
"conversation-update",
"transcript",
"transcript[transcriptType=\"final\"]"
]
}
{
"serverMessages": [
"conversation-update",
"transcript",
"transcript[transcriptType=\"final\"]"
]
}
Send this in your PATCH request to your assistant's endpoint. This should enable transcript events for your server URL without validation errors.
Reference: Vapi API docs Source: - Vapi API Reference: Update Assistant
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
vicious-gold
vicious-goldOP7h ago
The patch request url does not exist when I search it
No description
vicious-gold
vicious-goldOP6h ago
My assistant ID is 6ee0e0ec-a330-4766-b513-715104e70a24 What should the PATCH https be? @Duckie How do I generate the JWT? is that needed since i dont have authorization?
Vapi
Vapi6h ago
To generate a JWT for Vapi API authorization, you typically use your backend to sign a token with your Vapi credentials. Here’s a Node.js example using the jsonwebtoken package:
const jwt = require('jsonwebtoken');

const payload = {
// Add any required claims here
};
const secret = 'YOUR_VAPI_CLIENT_SECRET';

const token = jwt.sign(payload, secret, { expiresIn: '1h' });
console.log(token);
const jwt = require('jsonwebtoken');

const payload = {
// Add any required claims here
};
const secret = 'YOUR_VAPI_CLIENT_SECRET';

const token = jwt.sign(payload, secret, { expiresIn: '1h' });
console.log(token);
Use this JWT as your Bearer token in the Authorization header when making PATCH requests to the Vapi API.
Reference: Vapi Web SDK Docs – JWT Authentication Source: - Vapi Web SDK Docs – JWT Authentication
eastern-cyan
eastern-cyan5h ago
@valentine0712 Hold on Are you using the web sdk? Or are these phone calls that are needing to display the transcript?

Did you find this page helpful?