I cannot seem to figure out how to call a Twilio function correctly. I tried calling it by passing data via POST:
url = "https://xxxx-dev.twil.io/voicemail"
data = {'event': {'id': '00141',
'RecordingUrl': 'https://api.twilio.com/2010-04-01/Accounts/ssssss/Recordings/xxxxxxx.mp3',
'From': '+12xxxxxxxxx',
'textTranslation': 'something here'}}
requests.post(url, data=data)
It doesn't seem to work. It returns 500 because it does not find the event object or the context object. How do I pass event, context, callback when calling a function directly?