import os
import nexmo
client = nexmo.Client(
application_id=os.getenv("NEXMO_APPLICATION_ID"),
private_key=os.getenv("NEXMO_PRIVATE_KEY", "./private.key"),
)
response = client.create_call(
{
"to": [{"type": "phone", "number": os.getenv("TO_NUMBER")}],
"from": {"type": "phone", "number": os.getenv("NEXMO_NUMBER")},
"answer_url": [f"{os.getenv('VAPI_URL')}/answer"],
}
)
view raw vapi.py hosted with ❤ by GitHub