twilio

How to get call details Error and Warnings from API


I've been trying to retrieve the error and message fields from the "Errors and Warnings" associated with my twilio call using the python SDK (or any http request). I can't find anywhere in the documentation that references this.

It doesn't seem to be on the CallInstance returned by client.calls.get(call_sid).fetch()

Is there some way to query for this information using the Call SID that i'm missing?

Call Details Page


Solution

  • The response from the call resource API should have a link showing how to fetch the notifications associated with the call.

    With this, you can then make that API call to fetch the notification SID(s) (which look like NOxxxxx), then finally use that notification SID to fetch the the error information related to that notification SID via the monitor alert API

    Fetch a call resources Fetch an alert