Use of twiml attribute in Client.calls.create()l

I am new on Twilio and I was trying to use the following tutorial:

https://www.twilio.com/docs/voice/tutorials/how-to-make-outbound-phone-calls-python

Using the twiml attribute instead of Url:

call = client.calls.create(
                        twiml='<Response><Say>Ahoy, World!</Say></Response>',
                        to='+YYYYYYYYY',
                        from_='+XXXXXXXXX'
                    ) 

When I launched it, I received the following error:

responded with an error: error processing request: create() got an unexpected keyword argument 'twiml'

Is twiml deprecated? I use the last version of Twilio and Python 2.7. It seems really odd to me since the tutorial was made in January 2020.

1 answer