The Dude
07/24/2024, 8:11 AMVapi
07/24/2024, 8:11 AMVapi
07/24/2024, 8:12 AMserverUrl
or serverUrlSecret
if it's a secret URL, and I can help you construct the correct "voice_url" to use.Vapi
07/24/2024, 8:12 AMShubham Bajaj
07/24/2024, 8:34 PMShubham Bajaj
07/24/2024, 8:38 PMShubham Bajaj
07/24/2024, 8:38 PMShubham Bajaj
07/24/2024, 8:38 PMThe Dude
07/25/2024, 7:17 AMurl = "https://api.vapi.ai/phone-number/import/twilio"
payload = {
"twilioPhoneNumber": phone_number,
"name": uuid.uuid4().hex,
"twilioAccountSid": os.getenv("TWILIO_ACCOUNT_SID"),
"twilioAuthToken": os.getenv("TWILIO_AUTH_TOKEN"),
"assistantId": vapi_assistant_id,
}
headers = {
"Authorization": f"Bearer {os.getenv('VAPI_PUBLIC_KEY')}",
"Content-Type": "application/json",
}
update number
url = f"https://api.vapi.ai/phone-number/{phone_number_id}"
payload = {
"name": "", # this is the name of the number, it is not the name of the assistant
"assistantId": vapi_assistant_id,
}
headers = {
"Authorization": f"Bearer {os.getenv('VAPI_PUBLIC_KEY')}",
"Content-Type": "application/json",
}
Shubham Bajaj
07/25/2024, 9:46 PMThe Dude
07/31/2024, 9:50 AM