import requests
# Your Vapi API Authorization token
auth_token = 'YOUR_AUTH_TOKEN'
call_id = 'YOUR_CALL_ID' # The ID of the call you want to fetch details for
headers = {
'Authorization': f'Bearer {auth_token}',
}
# Make the GET request to Vapi to retrieve call details
response = requests.get(
f'https://api.vapi.ai/call/{call_id}', headers=headers)
# Check if the request was successful and print the call's customer number
if response.status_code == 200:
call_details = response.json()
customer_number = call_details.get('customer', {}).get('number')
print(f"Customer's number: {customer_number}")
else:
print('Failed to retrieve call details')
import requests
# Your Vapi API Authorization token
auth_token = 'YOUR_AUTH_TOKEN'
call_id = 'YOUR_CALL_ID' # The ID of the call you want to fetch details for
headers = {
'Authorization': f'Bearer {auth_token}',
}
# Make the GET request to Vapi to retrieve call details
response = requests.get(
f'https://api.vapi.ai/call/{call_id}', headers=headers)
# Check if the request was successful and print the call's customer number
if response.status_code == 200:
call_details = response.json()
customer_number = call_details.get('customer', {}).get('number')
print(f"Customer's number: {customer_number}")
else:
print('Failed to retrieve call details')