Mass Texting (SMS) Messaging Via Google Voice And Python

Get the files from Gist:

How to install.

Using the commandline type the following commands.

Install Python

sudo aptitude install python3.1

cd /tmp

Install Mercurial Source Code Manager

sudo aptitude install mercurial

Download The Python Google Voice Source

hg clone pygooglevoice/
cd pygooglevoice
hg pull
hg update

Build And Install Python Google Voice

python install

Test Python Google Voice

$ gvoice -e
gvoice> call
Outgoing number: 18004664411
Forwarding number: 19175555555

You need two files for this to work in the same directory. The Python code and a list of phone numbers example “phone_numbers.txt”. This file is included in the download.

Create a file named “” and store the code from below in it making it executable by doing the following.

chmod a+x

Example Usage:  ./ mypassword phone_numbers.txt “Test SMS”

#!/usr/bin/env python

import sys

from googlevoice import Voice
from googlevoice.util import input

sys.dont_write_bytecode = True

print “user name:” , username
print “password:” , password
print “phone_numbers:” , phone_numbers
print “the_message:” , the_message

voice = Voice()
voice.login(username, password)

def send_mass_text():
with open(phone_numbers, ‘r’) as inF:
for this_phone_number in inF:
voice.send_sms(this_phone_number, the_message)

send_mass_text ()

This entry was posted in Computer programming, Linux, Python and tagged , , , , , , , . Bookmark the permalink.

3 Responses to Mass Texting (SMS) Messaging Via Google Voice And Python

  1. Np says:

    Google rate limits

  2. Pingback: Auto Texter – send random SMS using Python and Google Voice API – spilt

  3. Thanks for the sweet post! it Helped me out a lot!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s