I'm using the following code to send an outbound SMS message from Twilio:
from twilio.rest import Client
account_sid = '<ACCOUNT SID>'
auth_token = '<AUTH TOKEN>'
client = Client(account_sid, auth_token)
message = client.messages.create(to='<To mobile number>',
from_='<Twilio phone number>',
body='Stackoverflow is awesome!')
print('Message ID: ' + message.sid)
The code worked fine for my mobile number i.e. the messages are received on my phone and the Programmable Messaging Log shows the status Delivered. All good!
However, some of my friends/colleagues couldn't receive messages on their phones. When I checked the Programmable Messaging Logs, it shows the status Sent (and not Delivered). I couldn't figure out the possible issue and a working solution to this problem.
Any guidance will be really appreciated.