X-Received: by 10.182.247.68 with SMTP id yc4mr26967456obc.34.1456143841618; Mon, 22 Feb 2016 04:24:01 -0800 (PST) X-Received: by 10.50.29.108 with SMTP id j12mr143079igh.6.1456143841595; Mon, 22 Feb 2016 04:24:01 -0800 (PST) Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!hb3no8210115igb.0!news-out.google.com!kr2ni3617igb.0!nntp.google.com!ok5no4352942igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Mon, 22 Feb 2016 04:24:01 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=117.253.244.105; posting-account=LPV9ggoAAAB0QwvcAJJbW6Xr98w8dVCs NNTP-Posting-Host: 117.253.244.105 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Setting up/authenticating Google API? From: Arshpreet Singh Injection-Date: Mon, 22 Feb 2016 12:24:01 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.python:103336 On Sunday, 21 February 2016 21:21:54 UTC+5:30, Skip Montanaro wrote: > This isn't strictly a Python question, however... Once I get myself > authenticated, I intend to use the Python Google API to pump archived > mail messages from a few defunct mailing lists into Google Groups. I > thought it would be pretty straightforward, but my attempts a few > months ago were completely unsuccessful. I asked for help on the > relevant Google product forum but got zero assistance. > > I'd really appreciate a little help with the setup. If anyone has had > successful experience with this, please contact me off-list. Once I > get something going, I'll write a blog post so others don't have the > same problems I have. > > Thanks, > > Skip Montanaro Your question seems quite cinfusing to me but I think following may is what you are asking for.(Read the source) https://google-mail-oauth2-tools.googlecode.com/svn/trunk/python/oauth2.py After getting the authentication you can use imaplib to get all the gmail Data.