Muffins
05/06/2024, 12:05 AMVapi Support
05/06/2024, 12:05 AMVapi Support
05/06/2024, 12:05 AMpython
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)
This code sample demonstrates how to use the "Get Call" endpoint to fetch details about a specific call, including its transcript, by making a GET request with the call ID. Replace <YOUR AUTH TOKEN>
with your actual Vapi API authorization token and <CALL ID>
with the ID of the call you're interested in [(1)]() .
Remember, to use this script, you'll need to have already made a call or have a call ID that was generated by your Vapi application. You can find more detailed information about the "Get Call" endpoint in the Vapi documentation.Muffins
05/06/2024, 12:55 AMcall_id
?Sahil
05/06/2024, 8:55 AMMuffins
05/06/2024, 9:35 AMSahil
05/06/2024, 9:36 AMSahil
05/06/2024, 10:42 AMMuffins
05/06/2024, 1:06 PM{"message":["id must be a UUID"],"error":"Bad Request","statusCode":400}
https://cdn.discordapp.com/attachments/1236831112538624121/1237027620135239710/image.png?ex=663a273f&is=6638d5bf&hm=a3a9c98b7c6f9919933779c05c53a64a4f2965d9d761c5b78a1db103f4ce1abf&Sahil
05/06/2024, 1:10 PMMuffins
05/06/2024, 1:20 PMresponse.json()[0]['transcript']
did it for me 😄Sahil
05/06/2024, 1:20 PM