{"id":842,"date":"2013-01-27T14:14:44","date_gmt":"2013-01-27T21:14:44","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=842"},"modified":"2013-01-27T14:18:10","modified_gmt":"2013-01-27T21:18:10","slug":"delete-or-mark-as-read-all-google-voice-messages","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=842","title":{"rendered":"Delete or mark as read all Google Voice messages."},"content":{"rendered":"<p>What led me down this path?  Well, for some reason the geniuses at Google decided to make it very difficult to delete or select all of your messages.  Using a browser, you are only able to select 10 at a time.  On a mobile device, using an application, it is even more painful.  I did some digging around and found pygooglevoice.  It allows you to utilize the Google Voice API via Python.  Most these will only operate on 10 messages at a time, however that is easily rectified with multiple calls or some better python programming than I know.<\/p>\n<p>You need to have python installed to execute these scripts.  I used these on a CentOS 6 system.  <\/p>\n<p>Software: http:\/\/code.google.com\/p\/pygooglevoice\/<\/p>\n<p>Installation\/Configuration:<\/p>\n<blockquote><p># yum install python python-setuptools<br \/>\n# easy_install simplejson<br \/>\n# easy_install -U pygooglevoice<br \/>\n# cd \/usr\/lib\/python2.6\/site-packages\/pygooglevoice-0.5-py2.6.egg\/googlevoice<br \/>\n# vi settings.py<br \/>\n&#8230;<br \/>\n# JGZ &#8211; Updated login URL since default did not work<br \/>\n#LOGIN = &#8216;https:\/\/www.google.com\/accounts\/ServiceLoginAuth?service=grandcentral&#8217;<br \/>\nLOGIN = &#8216;https:\/\/accounts.google.com\/ServiceLogin?service=grandcentral&#8217;<br \/>\n&#8230;<\/p><\/blockquote>\n<p>Script samples to use the module:<\/p>\n<p>Delete all read messages from your inbox:<\/p>\n<blockquote><p>from googlevoice import Voice<\/p>\n<p>voice = Voice()<br \/>\nvoice.login(&#8216;GOOGLEVOICELOGIN&#8217;, &#8216;PASSWORD&#8217;)<\/p>\n<p>for message in voice.inbox().messages:<br \/>\n    if message.isRead:<br \/>\n        message.delete()\n<\/p><\/blockquote>\n<p>Delete all read messages from your trash:<\/p>\n<blockquote><p>from googlevoice import Voice<\/p>\n<p>voice = Voice()<br \/>\nvoice.login(&#8216;GOOGLEVOICELOGIN&#8217;, &#8216;PASSWORD&#8217;)<\/p>\n<p>for message in voice.trash().messages:<br \/>\n    if message.isRead:<br \/>\n        message.delete()\n<\/p><\/blockquote>\n<p>Mark all unread messages as read:<\/p>\n<blockquote><p>from googlevoice import Voice,util<\/p>\n<p>voice = Voice()<br \/>\nvoice.login(&#8216;GOOGLEVOICELOGIN&#8217;, &#8216;PASSWORD&#8217;)<\/p>\n<p>while True :<br \/>\n    folder = voice.search(&#8216;is:unread&#8217;)<br \/>\n    if folder.totalSize <= 0 :\n        break\n    util.print_(folder.totalSize)\n    for message in folder.messages:\n        util.print_(message)\n        message.delete(1)<\/p><\/blockquote>\n<p>Script sample usage:<\/p>\n<blockquote><p># python gvscriptname<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>What led me down this path? Well, for some reason the geniuses at Google decided to make it very difficult to delete or select all of your messages. Using a browser, you are only able to select 10 at a time. On a mobile device, using an application, it is even more painful. I did [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[312,313],"class_list":["post-842","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-google-voice","tag-python"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=842"}],"version-history":[{"count":6,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/842\/revisions"}],"predecessor-version":[{"id":891,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/842\/revisions\/891"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}