Getting call transcript in Python
I can obtain the call transcript by copy/pasting from the dashboard. Is there a way to get back the call transcript in Python? I can't find it in the documentation.
<YOUR AUTH TOKEN> with your actual Vapi API authorization token and <CALL ID> with the ID of the call you're interested in (1) .call_id ?{"message":["id must be a UUID"],"error":"Bad Request","statusCode":400}
response.json()[0]['transcript'] did it for me <YOUR AUTH TOKEN><CALL ID>call_id{"message":["id must be a UUID"],"error":"Bad Request","statusCode":400}response.json()[0]['transcript']import requests
# Your Vapi API Authorization token
auth_token = '<YOUR AUTH TOKEN>'
# The ID of the call you want the transcript for
call_id = '<CALL ID>'
# Create the header with Authorization token
headers = {
'Authorization': f'Bearer {auth_token}',
}
# Make the GET request to Vapi to retrieve the call details
response = requests.get(
f'https://api.vapi.ai/call/{call_id}', headers=headers)
# Check if the request was successful and print the transcript
if response.status_code == 200:
print('Transcript:', response.json().get('transcript'))
else:
print('Failed to retrieve call details')
print(response.text)