Mrpoopybutthole
05/11/2024, 6:05 AMVapi Support
05/11/2024, 6:05 AMVapi Support
05/11/2024, 6:05 AMpython
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')
Vapi Support
05/11/2024, 6:05 AM'YOUR_AUTH_TOKEN'
and 'YOUR_CALL_ID'
with your actual Vapi API authorization token and the ID of the call you're interested in, respectively .
Please note, the exact structure of the response and the way you access the customer's number may vary based on the API's current implementation, so it's important to refer to the official Vapi documentation for the most accurate and up-to-date information.