Atreyee Roy
Atreyee Roy

Reputation: 45

Can I use an US number in Twilio in India?

I am just starting to use Twilio. If i use the default US number, can I send message in India? Using python.

Upvotes: 0

Views: 1115

Answers (1)

philnash
philnash

Reputation: 73029

Twilio developer evangelist here.

You should be able to send messages to India using a US Twilio number. There are a few notes and caveats here though.

  • If you are just starting with Twilio and have not upgraded your account yet, you can only send SMS messages to numbers that you have verified with Twilio
  • Messages sent to India from a regular Twilio number count as promotional messages and have the following restrictions:
    1. Can’t send same message from same international number to same destination number within 20 mins.
    2. Marketing messages should be sent between 9 AM to 9 PM local time.
    3. Sender ID for international number will be replaced with XX-NNNNNN (2 letters followed by 6 numbers).

More details on the restrictions of sending to India is available here: https://support.twilio.com/hc/en-us/articles/223134167-Limitations-sending-SMS-messages-to-Indian-mobile-devices

Finally, using Python to send SMS messages is definitely possible.

I recommend you install the Twilio helper library for Python. Then the code you need looks like:

from twilio.rest import Client

# put your own credentials here
account_sid = "you_account_sid"
auth_token = "your_auth_token"

client = Client(account_sid, auth_token)

client.messages.create(
    to=TO_NUMBER,
    from_=YOUR_TWILIO_NUMBER,
    body="Hello from Twilio!")

Upvotes: 1

Related Questions