# Send SMS using Twilio in ansible , getting below error

**URL:** <https://forum.ansible.com/t/send-sms-using-twilio-in-ansible-getting-below-error/24723>\
**Category:** Ansible Project\
**Created:** [June 14, 2017, 10:11am UTC](https://forum.ansible.com/t/send-sms-using-twilio-in-ansible-getting-below-error/24723 "2017-06-14T10:11:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nishant\_bawane](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@nishant\_bawane](https://forum.ansible.com/u/nishant_bawane)\
**Post date:** [June 14, 2017, 10:11am UTC](https://forum.ansible.com/t/send-sms-using-twilio-in-ansible-getting-below-error/24723/1 "2017-06-14T10:11:07Z")

</div>

i have tried using the twilo still not able to get the output -

- hosts: localhost  
tasks:
- name: Send notification message via twilio  
twilio:  
msg: ‘Hello from Nishant via Ansible’  
account\_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxx  
xxxxxx  
auth\_token: a0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  
from\_number: +918793127307  
to\_number: +919168612880  
delegate\_to: localhost

below is the error-

fatal: [localhost → localhost]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “Failed to validate the SSL certificate for [api.twilio.com:443](http://api.twilio.com:443). Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python \>= 2.7.9 on your managed machine or you can install the urllib3, pyopenssl, ndg-httpsclient, and pyasn1 python modules to perform SNI verification in python \>= 2.6. You can use validate\_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/[cacert.org](http://cacert.org), /etc/ansible”}.

Can someone please share the working playbook for the same for reference.

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [June 15, 2017, 3:41pm UTC](https://forum.ansible.com/t/send-sms-using-twilio-in-ansible-getting-below-error/24723/2 "2017-06-15T15:41:53Z")

</div>

Looks like you either need to use a more recent version of python. Perhaps you can delegate the module to run on a newer linux distribution if you can’t upgrade your ansible controller machine.
