Joke Collection Website - Public benefit messages - Can python use twilio

Can python use twilio

Twilio is not the only SMS gateway service. If you don't like using Twilio, you can search for free SMS gateway and Python online. Sms api, even twilio substitutes, looking for alternative services.

The version used is python3.6. 1. Install this module. In cmd, enter pip install twilio to install twilio.

1. Visit twilio to fill in the registration form. After registering a new account, you need to verify a mobile phone.

The number to which the SMS will be sent.

2.2. Trial balance provided. Twilio includes a phone number that will be used as the sender of the short message. You will need

Two pieces of information: your account SID and AUTH (authentication) logo. After logging in to your Twilio account, you can log in.

This information can be found on the dashboard page. These values will be used as your Twilio when logging in from a Python program.

User name and password.

3. Create a new text my. py and enter the following code:

From where? Take a break? Import? Clients?

Account? =? ' xxxxxxxxxxxxxxxxxxxxxxx '?

token? =? ' YYYYYYYYYYYYY '?

my number = '+86 xxxxxxxxxxxxxxx '?

twili number = '+XXXXXXXXXX '?

def? Text my (message):?

Clients? =? Customer (account, token)?

Leave a message =? client . messages . create(to = my number,? from _ = twilioNumber,?

Body=message) where you want to replace your number with xxxxx, yyyy.

You can call the textmyself function in python in the future, such as:

Import? Text yourself?

Textmyself.textmyself ('haha, I'll send it') If you want to send a message to others, you need to replace "myNumber". Note: This number must have been verified in twilio official website.