Download google_talk_sms.pl 0.2
(requires Pidgin 2.5.2 or above)
Pidgin web site
About Pidgin plugins
Google Talk web site
About Google Talk SMS
google_talk_sms.pl is a plugin for Pidgin that allows it to use Google Talk‘s SMS text messaging feature, which is otherwise restricted to the official clients.
Note: If you’re on Ubuntu Lucid, its Pidgin 2.6.6 package has a bug that breaks most Perl plugins, including this one. It should be fixed in the next Pidgin release.
I originally used AIM’s SMS support to send text messages to my friends from my computer. It worked, and my friends could reply to my texts, but the phone numbers it used were only temporary. My friends couldn’t initiate conversations with me via SMS; I had to text them first.
When Google Talk added SMS support, it included a killer feature: dedicated phone numbers. It didn’t give me a unique phone number for receiving texts via IM, but it did remember which phone numbers it had used for each of my friends, so they could text that number whenever they wanted. If I was online, I’d get the text immediately, as an IM. If I was offline, I’d get it when I logged.
I loved this, so I immediately switched to Google Talk for SMSes. Sadly, other people did too, and since each SMS costs money, Google decided to restrict the feature to official clients. Other clients received the error message “SMS_ERROR_11: Sorry we don’t support free SMS messaging through this client. Visit http://gmail.com/sms for more info. (Code 405)”

The restriction is fairly simple, though. The Google Talk servers simply
look for sms-v1 or sms-v1 in the ext attribute of caps:c (the
XEP-0115 Capabilities extension)
in the presence stanza that the client sends to the server.
google_talk_sms.pl simply adds this.
Here’s an example presence stanza sent by the Google Talk web-based client:
<presence from="xxx@gmail.com to="yyy@gmail.com">
<priority>0</priority>
...
<caps:c node="http://mail.google.com/xmpp/client/caps"
ver="1.1"
ext="pmuc-v1 sms-v1 vavinvite-v1"
xmlns:caps="http://jabber.org/protocol/caps"/>
...
</presence>
Note the sms-v1. Here’s a similar presence stanza generated by Pidgin and
annotated by google_talk_sms.pl before being sent
to the Google Talk servers:
<presence>
<priority>1</priority>
<c xmlns='http://jabber.org/protocol/caps'
node='http://pidgin.im/caps'
ver='2.5.2'
ext='moodn nickn tunen bob avatar sms-v1 sms-v2' />
</presence>
Happy texting!





85 Comments
I love this idea, I just don’t know how to add my SMS contacts to Pidgin. I’ve tried adding XXX-XXX-XXXX and XXX-XXX-XXXX@gmail.com but neither of those seem to be working.
Do you know the format for adding numbers you’d like to send SMS messages?
good question! yeah, this confused me at first too. the format is +1XXXXXXXXXX@sms.talk.google.com, where XXXXXXXXXX is the area code and phone number.
THANK YOU!! So much… I’ve been using Google SMS and Pidgin for a while, but integration is what Pidgin is all about. Your solution seems to be working great for me.
Well seems Google got wind of your fix and now it is blocked. Just tried it today (dropped the .pl to the plugins), read my Gtalk SMS number I already had saved, but as soon as I tried to send : same blocking notice as you said.
hmm. silly question, but did you enable the plugin in the Tools -> Plugins window?
Works for me, except the contact that I’ve added is always considered Offline, and “Not Authorized”. Is there anyway to get the contact to appear online?
sorry, no, that’s an inherent limitation of google talk’s sms implementation. they support sending and receiving messages, but not presence.
I’m using pidgin portable 2.5.5 and when I plop the .pl into my plugins folder it won’t show in the plugins list, all my other plugins are in .dll format.
I’m on vista
Like the above, I put the .pl in the plugins and it wouldnt show up in plugins list. All other plugins are .dll, what’s goin on here
aishalove, ro, it sounds like you’re both on windows. unfortunately, i’ve only tested on linux, not windows or mac.
i’m guessing the windows version of pidgin doesn’t support perl plugins? or maybe you have to do something extra? i’m not sure.
ah, the docs say you need ActivePerl installed. try that?
I’ll confirm it works on Windows. Just have to install ActivePerl (x86, not x64) as ryan said.
Thanks Ryan, merely installing ActivePerl is all it takes guys. I kept thinking I had to use that program to convert the pl to a dll or something, but then checked the plugins list and there it was!
thanks allot, I’m sure that is what II needed, I was unaware that the .pl extension meant “pearl” thought it stood for “plugin”
Well seems google changed their authentication for SMS or I’m jus unlucky, because this won’t work even after enabling the plugin. and adding the contact correctly.
aishalove, I’m still using it and it works perfectly fine. Perhaps you didn’t input the contacts in the correct format “+1XXXXXXXXXX@sms.talk.google.com”.
Now for the rest of you, an easy way to streamline the contacts into the buddylist is to put all your sms contacts into one group, and then right click the group and select “Show when Offline”. That way all the contacts in the group shows up (since there’s no presence detection and they would always be shown as offline).
Rechecking the number did it, I had 2 number wrong
Does this work outside of US?
@koko, i expect it does, but i don’t know for sure. are you outside the US? does it work for you?
Yes, I am outside of US and I’m receiving this error
“Message delivery to +160169999999@sms.talk.google.com failed: SMS_ERROR_3: invalid mobile number +160169999999 (Code 400)”
What would be my mistake?
Well straight from google they said their SMS is US Only.
its not working for me. I always get the error…
XMPP Message Error
Message delivery to +17773334444@sms.talk.google.com failed: SMS_ERROR_11: Sorry we don’t support free SMS messaging through this client. Visit http://gmail.com/sms for more info. (Code 405)
perhaps I’ve configured it incorrectly? I only enabled the plugin and added a contact/cell# buddy for google talk
Hi, same error for me:
Nachrichtenzustellung an +19146613XYZ@sms.talk.google.com fehlgeschlagen: SMS_ERROR_11: Sorry we don’t support free SMS messaging through this client. Visit http://gmail.com/sms for more info. (Code 405)
(means message delivery failed)
PS: I’m living in Germany and want to write SMS to a mobile phone number in New York.
I knew that the SMS feature was for US only, I just wanted to know if anyone was able to get it working outside the US since I’m able to receive SMS notification from Google’s Calendar. Anyway thanks for the explanation though :)
Interesting… Google Chat doesn’t allow sending a SMS to a Google Voice number in this manner. Perhaps GV will open up APIs to allow sending SMS via your associated GV account/number?
Regardless, I love the work you’ve done ryan.
no error messages any more. let’s see if the messages have been transfered :-)
Thenktor — I just installed the plug-in and got the same Code 405 error. Did you do something to fix it?
Also, apparently when I add a new number to my buddy list (but before I actually try to send an SMS) the phone will receive a message saying “<my_name>@gmail.com sent you a text message…”. There is no way to read the message, so I don’t know what it might be. Then if I actually try to send an SMS to the new “buddy”, I get the error message and nothing is sent.
I did not change anything, but it only worked2 or 3 times. Now I’m getting this error:
SMS_ERROR_1: Free messages to mobile number +1914661xxxx reached limit. (Code 500)
I am using linux, dropped the .pl file in the plugins folder (which I created) in ~/.purple and it is not showing up in pidgin’s plugins list… I have v2.5.5 installed… is it too old or something?
I am using linux, dropped the .pl file in the plugins folder (which I created) in ~/.purple and it is not showing up in pidgin’s plugins list… I have v2.5.5 installed… is it too old or something?
I am using linux, dropped the .pl file in the plugins folder (which I created) in ~/.purple and it is not showing up in pidgin’s plugins list… I have v2.5.5 installed… is it too old or something?
not sure why it posted my message multiple times… sorry for the unintentional spam…
This is awesome. Thank you I hated having gmail up to get sms’s I’d always miss them. To people having issues on windows here’s one thing that fixed it for me I think. After downloading activeperl and saving the script in the right dir I got the error message about not being a valid client even though I had restarted pidgin and enabled the plugin. I edited the script and saw that it had unix style cr/lf which show up as [] I deleted them and replaced them with returns in wordpad and saved it. Restarted pidgin and the sms went through.
Again. Very cool. Thanks.
I would just like to reiterate that for anyone using windows, you either need to modify the google_talk_sms.pl file and replace the squares with carriage returns, or simply replace the contents with the following (I’ve modified the file below):
!/usr/bin/perl -w
File: google_talk_sms.pl
Author: Ryan Barrett <pidgin@ryanb.org>
This is a Perl plugin for Pidgin that works around Google Talk’s
restriction of its SMS feature to official clients by by reporting that
Pidgin supports the ‘sms-v1′ XMPP capabilities (XEP-0115) extension.
Details in http://snarfed.org/space/google_talk_sms+pidgin+plugin
Thanks to Michael Braun’s Perl plugin for XEP-0027 (encryption), which
provided a great example of how to use pidgin’s xmlnode data structure in
Perl: https://www.zuhauseall.homeip.net/~michael/pidgin-xep0027/
use strict;
use Purple;
our %PLUGIN_INFO = (
perl_api_version => 2,
name => “Google Talk SMS”,
version => “0.1″,
summary => “Enables Google Talk’s SMS feature, which is normally restricted to official clients.”,
description => “Works around Google Talk’s restriction of its SMS feature to official clients by reporting that Pidgin supports the ‘sms-v1′ XMPP capabilities (XEP-0115) extension.”,
author => “Ryan Barrett <pidgin\@ryanb.org>”,
url => “http://snarfed.org/space/google_talk_sms+pidgin+plugin”,
load => “plugin_load”,
unload => “plugin_unload”
);
sub plugin_init {
return %PLUGIN_INFO;
}
sub plugin_load {
my $plugin = shift;
my $jabber = Purple::Find::prpl(“prpl-jabber”);
Purple::Signal::connect($jabber, “jabber-sending-xmlnode”, $plugin,
\&jabber_sending_xmlnode_cb, “unused userdata”);
}
sub plugin_unload {
my $plugin = shift;
}
sub jabber_sending_xmlnode_cb {
my ($connection, $xmlnode, $userdata) = @;
my $c = $xmlnode->get_child(“c”);
if (not defined($c)) {
return;
}
my $ext = $c->get_attrib(“ext”);
if (not defined($c)) {
$ext = “”;
}
$c->set_attrib(“ext”, $ext . ” sms-v1″);
$[1] = $xmlnode;
}
Its actually too bad that ActivePerl is required because this then doesn’t make this app truly portable that you could run from a USB drive — or is there another way for a work-around to make this a portable app?
“Its actually too bad that ActivePerl is required because this then doesn’t make this app truly portable that you could run from a USB drive — or is there another way for a work-around to make this a portable app?”
This is exactly what I came in here to say. Is there a way to convert the .PL into the required .DLL file? Excuse my programming ignorance if this is not possible. I tried to google a way to do this but couldn’t find much.
I really want to get this running on my USB portable pidgin install without needing to install activeperl.
Any help would be greatly appreciated.
“Its actually too bad that ActivePerl is required because this then doesn’t make this app truly portable that you could run from a USB drive — or is there another way for a work-around to make this a portable app?”
This is exactly what I came in here to say. Is there a way to convert the .PL into the required .DLL file? Excuse my programming ignorance if this is not possible. I tried to google a way to do this but couldn’t find much.
I really want to get this running on my USB portable pidgin install without needing to install activeperl.
Any help would be greatly appreciated.
I definitely didn’t post that twice, I swear I’m not that dumb.
Um, what great deal is this plugin if people can’t reply back to you through SMS?
Dave, they can.
This little plugin works great, thanks! I just hope Google will give us proper Google Voice integration soon!
just curious if this plugin is still working. I tried to use it and I get the error mesage: Message delivery to <myNumber>@sms.talk.google.com failed: SMS_ERROR_4: Mobile carrier of <myNumber> is not supported. (Code 503). Any help is really appreciated.
works for me.
I installed this and tried it and got the message that Google was not supporting sms through this client. What are people who have it working doing differently?
how to install this plugin?
I got this all installed and working perfectly on Windows 7, using 2.5.8. Had to install ActivePerl, and replace the text i nthe file with the format that KevDog posted above. Dropped the modified file in the plugin directory, restarted Pidgen, and it was there!
But – I have a question: All my SMS’s have a signature “-myaddress@gmail.com” taking up a whole bunch of SMS characters… How can I cut those out?
I’m getting the error now with the plugin installed:
SMS_ERROR_11: Sorry we don’t support free SMS messaging through this client. Visit http://gmail.com/sms for more info. (Code 405)”
Also getting the error now =( Time to fire up fiddler =D
Ok here’s a fix. Change this line in the perl file:
$c->set_attrib(“ext”, $ext . ” sms-v1″);
to
” Edit: Ivan Shevanski 2/12/2010 sms- v1 -> sms-v2
$c->set_attrib(“ext”, $ext . ” sms-v2″);
Works perfectly for me. Thanks for writing the plugin!
@Ivan, hmm, interesting. it works for me with sms-v1, but actually gives me that error message with sms-v2, ie with the edit you mentioned.
funny. i wonder if there’s something different between our accounts.
That is interesting. You could always just append both of them, since it doesn’t seem like google cares about the other arguments. Try using ” sms-v1 sms-v2″. It works for me anyway, how about you give it a try?
good point! that does work, so i’ve updated the plugin. thanks!
No problem. Glad I could help out.
Ryan, first of all, thanks for this awesome plugin. But, are you aware that Pidgin version 2.6.6 broke it? Thanks.
Yep. I’m in the same boat as manny. Running Ubuntu-Linux (Lucid).
ditto manny & MMA. Also on Ubuntu, though old (8.10), and Pidgin 2.6.6. Given the change log for 2.6.6 I’d just roll back to 2.6.5 if it was still in the PPA repository (or I knew how to roll it back some other way!).
Thanks for the plug-in, Ryan!
So, I’ve did everything listed above, but still can’t get it to work. I don’t get an error message or anything, Pidgin just crashes.
I have ActivePerl x86
I have the Plugin installed in the proper directory.
I have my gmail account enabled and working properly.
I’m running Windows 7 x64.
I don’t know what the issue is, but everytime I put the plugin into the directory and load Pidgin, Pidgin crashes. I remove the plugin from the directory and Pidgin runs fine. Has things changed or something?
Hey, I fixed it. Rolled back to an older version of Pidgin. Apparently 2.6.6 borks everything.
just wanted to say thank you. thank you. thank you. all you brilliant anonymous people – ryan barrett, kevdog – who know how to do this and then post it out there for the rest of us. thank you!
RUNNING UBUNTU 9.10 Pidgin 2.6.6
(libpurple 2.6.6)
PLUGIN FAILS – caused pidgin to crash upon startup.
any chance this will be fixed any time soon? its a great concept but unfortunately it isnt working now.
would it be easier to just edit the pidgin source and recompile?
thanks to dev and those who contributed feedback!
currently only aim/aol is successfully delivering my sms’s.
I have it working on XP service pack 3. I did have to install active perl as mentioned above. The curious matter was that the plugin got stuck and would not succeed in sending and receiving texts without changing the edited line from above to $c->set_attrib(“ext”, $ext . ” sms-v1″);
once i changed it, it worked fine and still does
Thanks for the marvelous plugin.
Ryan, can you put the Google SMS .pl file in a compressed format? I think your webserver is trying to execute it instead of giving web browsers the ability to download.
Thank
oops, sorry, thanks for the nudge. i’ve been changing a few things behind the scenes. it should be fixed now.
Just in case anyone is having trouble seeing this plugin on Windows, make sure you install ActivePerl 5.10 and not 5.12. For some reason I couldn’t get Perl enabled in Pidgin with version 5.12 <_<
Is there a way to make the SMS contact always appear online?
I have this plugin installed and enabled and I’m still getting the sms not supported through this client error. Perhaps they’ve caught on?
Nevermind! I can confirm andy shepherd’s method. You can only append sms-v1 for this to work. ” sms-v2″ or “sms-v1 sms-v2″ results in breakage. Change your script!
Huh. The “sms-v1 sms-v2″ works for me still. Pidgin 2.6.3 and plugin 0.1. No incentive to upgrade, everything works fine. Maybe a note to people up by the description to try the different methods would be more effective.
Hey, I can confirm that after upgrading today to 2.7.5, I needed to change it to just sms-v1 like before. Worked fine before the pidgin upgrade, so it’s got to be something specific to the client.
Cheers
Ryan, Ive been trying to sms message through my dedicated number but it continues to message through random numbers. Is there a setting or server i need to set?
@Kevin, sorry, i don’t know. that’s a bit beyond this plugin.
Could this workaround be applied to Adium as well? I know that they both run on libpurple…I just don’t know where to locate the proper file (if it exists) to modify so that it may work.
I am getting the error “Can’t locate Purple.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./google_talk_sms.pl line 17. BEGIN failed–compilation aborted at ./google_talk_sms.pl line 17.”
Any ideas here? I am running Pidgin 2.7.3 (libpurple 2.7.3)
Got it working but still getting the “blocked” error :(
Yes it is “SMS_ERROR_11: Sorry we don’t support free sms messaging through this client. Visit http://gmail.com/sms for more info. (Code 405)”. Any help or update for pidgin 2.7.9 and googletalksms?
i got the same message as alex ..
Hey guys. Just wanna let you know that this plugin still works. I’m using Ubuntu 11.04, with Pidgin 2.7.11. It won’t work at first, but change the line in the script that says “sms-v1 sms-v2″ to just sms-v1. It worked after that.
Thanks for this plugin :)
Confirmed, this still works on 11.04 with Pidgin 2.7.11 as LS says.
All,
I’m new to linux and I don’t know if my question is dumb one.
Can someone shows how to put the .pl file to plugin directory? I’m using mint 11. I can’t seem to find the folder.
ryan, may you please version the script download (like sms_pidgin_plugin-0.2.pl) so that it may be more easily packaged?
Thanks.
@binki, packaging it sounds great, thanks!
embedding the version number in an individual filename would be problematic for a few different reasons, which is why you don’t see many projects do it.
for this file, the version is in the %PLUGIN_INFO structure near the top. i can also add it to the file comment, along with a changelog, in the future. hopefully that will help!
Thanks for the great plug-in.
Where do I put this in Win7? I’m running ActivePerl (x86) and version 2.10.0. I’ve put it everywhere and can’t get it to show up in my plugin directory.
Anyone else know?
A lot of people seem to have trouble with this plugin on Windows.
Here’s the way to do it.
1) You should install Perl 5.10. 5.12 is not compatible with Pidgin. 5.10 is not available for free from ActivePerl. So, you can get Strawberry Perl 5.10 from http://strawberryperl.com/releases.html (download: http://strawberryperl.com/download/5.10.1.4/strawberry-perl-5.10.1.4.msi)
2) You should update environmental variables. You can simply achieve this by restarting. Or, you should go and modify the environment variables. The installer changes relevant variable but changes don’t take effect immediately. But, when you change environment variable manually, changes take effect immediately.
3) Copy your Perl script to Documents and Settings/user_name/Application Data/.purple/plugins
4) Restart Pidgin if it was running. Activate your plugin from Pidgin and restart Pidgin.
That’s it. Now, the plugin works.
Thanks again for your work, Ryan.
Thanks @Nibras for the tips on how to make this work with Windows. I got it up and working in 2 minutes with your help.
Now I have another question. I can IM my mobile back and forth, but I can’t get it to show up online. I only get the “Not Authorized” message from Pidgin. (I’ve added my mobile as “+1xxxxxxxxxx@sms.talk.google.com”)
Can anyone else tell me what I am doing wrong? I would like my mobile to show up as online (permanently) if at all possible.
Thanks
@Nibras thank you, those tips worked for me.
just like LS said on 05/24/2011 (http://snarfed.org/google_talk_sms_pidgin_plugin#comment-40646)
It works! But I needed to change ” sms-v1 sms-v2″ to ” sms-v1″. Before doing that I kept getting the “sorry we don’t support … through this client…”
My only problem now is that gmail doesnt save these chats- it saves normal ones but not SMS ones. Might be because I do everything through gmail chat and not through googletalk. Oh well. Great plugin thanks!