google_talk_sms pidgin plugin

Download google_talk_sms.pl 0.4
   (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' />
</presence>

Happy texting!

64 thoughts on “google_talk_sms pidgin plugin

  1. 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?

  2. 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.

  3. 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 <_<

  4. 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?

  5. 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!

  6. 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

  7. 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?

  8. 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.

  9. 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)

  10. 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?

  11. 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 :)

  12. Confirmed, this still works on 11.04 with Pidgin 2.7.11 as LS says.

  13. 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.

  14. ryan, may you please version the script download (like sms_pidgin_plugin-0.2.pl) so that it may be more easily packaged?

    Thanks.

  15. @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!

  16. 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?

  17. 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.

  18. 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

  19. 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!

  20. Thank you for this plugin and thanks to all for the help with Windows. Just confirmed working with latest Windows Pidgin 2.10.1 after down-rev’ing Perl to Strawberry 5.10 and then removing ” sms-v2″ as instructed in the previous comments.

    thanks again to all!

  21. thanks for the info, all! i’ve posted an updated version of the script with sms-v2 removed.

  22. Hello all. I’m having trouble getting this plugin to work on Windows 7. I’ve followed Nibras’ instructions and jumped between Ryan’s and KevDog’s script, but the plugin will never show up in the plugin list. Also, I have the newest version of Pidgin installed. Any ideas? Thanks in advance!

  23. I’ve just installed the plugin (no sms-v2) and got the SMS_ERROR_11 error. Anyone can confirm that it is still working or Google managed to block it again?

  24. My apology. It still work. Dunno why it does not first the first couple of times.

  25. Still having problems. Help, anyone??

  26. This doesn’t work for me anymore, I get errors these days since a few weeks.

                                         XMPP Message Error             
    

    free SMS messaging through this client. Visit http://gmail.com/sms for more info. (Code 405)
    test

  27. thanks for the nudge! looks like it needs both sms-v1 and sms-v2 again now. i’ve fixed it and bumped the version to 0.4.

  28. It’s broken again. SMS_ERROR_11 and code 405.

    Maybe you should email them and ask why they seem to be actively trying to shut this down?

  29. Confirmed worked on OSX 10.7.3 after
    sudo port install pango +quartz +no_x11
    sudo port install pidgin +no_x11 +quartz
    plugin installed in
    .purple/plugins

  30. Hello all, again. I’m having trouble getting this plugin to work on Windows 7 Pro with the latest version of Pidgin. I’ve followed Nibras’ instructions and jumped between Ryan’s and KevDog’s script, but the plugin will never show up in my plugin list. Any ideas? Thanks in advance!

  31. keereho salamete mannu balunku keereno ati hitooti salame noto didatto timirtehittooti karde adhitin saino woyisi hitooti.anni zerihunit ke hawassa.thank you?

  32. For those in Linux who cannot see the plugin, make sure pidgin-perl is installed. That’s what makes pidgin ‘see’ perl based plugins.

  33. Also, libpurple-perl installs as a dependency, or you may need to add manually.

  34. i get this error when attempting to download the plugin:

    You don’t have permission to access /src/snarfed/space/google_talk_sms.pl on this server.

  35. sorry ryan, i’m still getting 403 FORBIDDEN error when trying to d/l the script. could it be something on my end causing problems?

  36. silly question, but try refreshing? your browser is probably caching the old version of the page with the old link.

  37. Fourth time’s a charm? I’m STILL having trouble getting this plugin to work on Windows 7 Pro with the latest version of Pidgin. I’ve followed Nibras’ instructions and jumped between Ryan’s and KevDog’s script, but the plugin will never show up in my plugin list. Any ideas/guidance? Please and thank you!

  38. Today I tried the method given by nibras, and the result works well. Finally I can send sms via gtalk pidgin. Thanks

  39. I HATE all the Toilet Paper headed Proprietary protocols… I hate having to have a dozen different “chat” clients installed and running and taking up system resources and taking up window space on my desk-top.

    This should be (I’m a programmer)… IS so easy to do in ONE program. Except for the BRAND-Headed Pigs that run the Internet and the World.

    Got ONE TEXT Message saying I’d got an SMS. But not the contents… and NO SMS!!!!

    This is FUTILE!!!!

    Does not even seem to work for the native G-Talk Program.

    Gaaaaaaaaaahhhhhhhhhhhhhhhhhhh!!!!

  40. While we all hate proprietary protocols, it is worth keeping in mine that we are leeching off free services. In fact, the SMS gateway is something Google probably pays for, so it;s a bit hard to complain…

  41. When I clicked the link for the plug in i just got another page that had code. Here is the first part:

    !/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’ and ‘sms-v2’ XMPP capabilities (XEP-0115) extensions.

    #

  42. good question! i no longer use pidgin, but i expect it’s still working. i haven’t heard otherwise. is it not working for you?

  43. Just started using this plugin today with Pidgin 2.10.1 and Strawberry Perl 5.10. Confirmed still working. Thanks a lot for making this Ryan!

  44. This plugin still works great for me, I have to cut out sms-v2 at the bottom though for it to function on my end… but that’s beside the point. I like to use my buddy list to save these SMS contacts, but rightly- Google’s server considers these unauthorized contacts when you add them- so Pidgin reports them nastily as Not Authorized and considers them offline. Beyond the scope of this plugin to fix, yeah- but is there any possible way to make Pidgin locally think of these as “mobile” contacts, consider them “always online” to the user and not “not authorized”? I’m sure someone else using this plugin wondered about making it just a bit smoother on the UI side, and feel like less of a hack.

  45. This seems to have stopped working today. I’ve tried it with “sms-v1 sms-v2”, “sms-v1′, and “sms-v2”. Error is always:

    XMPP Message Error
    Message delivery to +1XXXXXXXXXX@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)

  46. i’m getting the same error as Jody as of today :(

  47. exactly the same error here. started a few days ago, at least that’s when i noticed it.

  48. hi Ryan,

    i tried opting in to hangouts, but got this error message, “We’re sorry, the feature you are looking for is currently only available in a limited number of countries.”
    i’m living in the USA.

  49. I too tried hangouts but it still doesn’t work. I guess this is plugin officially dead. I’m using the Mightytext Chrome plugin which works very well though.

Leave a Reply

Your email address will not be published. Required fields are marked *