How to send multiple numbers using nexmo with python
import nexmo
client = nexmo.Client(key='exxxxx', secret='Qxxxxxx')
client.send_message({
'from': 'Nexmo',
'to': '639354758282',
'text': 'Hello from Nexmo',
})
#!/usr/local/bin/python
import nexmo
client = nexmo.Client(key='*******', secret='*********')
phones = ['Number 1', 'Number 2', 'Number 2']
for phone in phones:
msg = 'Hello ' + phone + ' from Nexmo'
response = client.send_message({
'from': 'Nexmo',
'to': phone,
'text': msg,
})
print(response)