I'm trying to set a webhook callback that will be called by Twilio Studio at every stage of a posted message journey and send the activity status back to the webhook I set.
Studio Create Method (What Im currently using)
client.studio \
.v2 \
.flows(TwilioConstants.TWILIOFLOW_PROXY) \
.executions \
.create(
to=f'whatsapp:{user_number}',
from_=f'whatsapp:{TwilioConstants.BASENUMBER}',
parameters={
'name': data.customer.name,
'user_email': data.customer.email}
)
the create method will only accept 3 arguments
create(self, to, from_, parameters=values.unset):
However the messages create method accepts many arguments including the status_callback
client.messages.create
Can anyone tell me how I can get real-time individual WhatsApp message detailed updates sent to a webhook I set myself?
I have tried setting the webhook in: WhatsApp Sender -> Status callback URL but that appears to only send very granular data back and only when the user interacts with the message (to be fair I've not let the message timeout yet but possibly this would also be triggered if this happened or an error was encountered)
What I would like is more detailed information being posted back to my webhook such as found in Monitor -> Messaging -> Message Details
Any help with this one would be very much appreciated.