Sending Messages#
Sending a text message#
1from pywa import WhatsApp
2
3wa = WhatsApp(phone_id='972123456789', token='xxxxx')
4
5recipient = '972987654321'
6wa.send_message(to=recipient, text='Hello world!')
7
8# Message with link preview
9wa.send_message(
10 to=recipient,
11 text='PyWa Documentation: https://pywa.readthedocs.io',
12 preview_url=True
13)