Unable to Retrieve Chat Logs / Transcripts from Ch...
# support
c
Hi there, Thank you for your message. Our team is currently out of the office. We operate Monday through Friday, from 9:00 AM to 8:00 PM Pacific Standard Time (PST). We’ll get back to you as soon as possible during our normal business hours. If your message is urgent, please mark it accordingly or include “URGENT” in the subject line, and we’ll do our best to respond promptly. Warm regards, Vapi Customer Support Team
b
Hi team, We're currently facing an issue where chat transcripts are not being delivered, even though call transcripts are working perfectly. We're receiving all call-related data and summaries without issue, but for users who have interacted through chat (not voice), we’re unable to access or retrieve their chat logs or message history. What's the solution?
v
To retrieve chat logs for chat interactions, ensure you are saving the
chat.id
from each chat response and then use the
/chat/{id}
API endpoint to fetch the message history.
Here’s a quick example in TypeScript:
Copy code
typescript
// Fetch chat log by chat ID
const response = await fetch('https://api.vapi.ai/chat/your-chat-id', {
  method: 'GET',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const chat = await response.json();
console.log(chat.messages); // This contains the chat history
Make sure you are capturing and storing the chat ID after each interaction, as this is required to retrieve the logs later. [See API reference for details](https://docs.vapi.ai/api-reference/chats/get?explorer=true) Sources: - [GET Get Chat](https://docs.vapi.ai/api-reference/chats/get?explorer=true) - [Non-streaming chat documentation](https://docs.vapi.ai/chat/non-streaming)
5 Views