1

I'm trying to get started with the Groups Migration API. After much frustration, I believe I have gotten past authentication problems which stymied me for a long while. Now I'm stuck trying to get the rest of the quickstart.py script working. I got it from here:

https://developers.google.com/admin-sdk/groups-migration/v1/quickstart/python

When I run it, I get a 500 "backend error" response:
Traceback (most recent call last):
  File "quickstart.py", line 104, in <module>
    main()
  File "quickstart.py", line 96, in main
    media_body=media).execute()
  File "/Users/skip/local/lib/python2.7/site-packages/oauth2client/util.py", line 137, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/Users/skip/local/lib/python2.7/site-packages/googleapiclient/http.py", line 760, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 500 when requesting h
ttps://www.googleapis.com/upload/groups/v1/groups/old-cr-archive%40googlegroups.com/archive?uploadType=media&alt=json returned "Backend Error">

Here's the message it generates:

From nobody Fri Mar 25 11:38:23 2016
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Message-ID: <8025604423-old-cr-archive@googlegroups.com>
Subject: Groups Migration API Test (Python)
From: "Skip Montanaro" <skip.montanaro@gmail.com>
To: old-cr-archive@googlegroups.com
Date: Fri, 25 Mar 2016 11:38:23 -0500

This is a test.

I'm stumped. Any clues about what I might be doing wrong? The only changes I've made to the script are to print information and to hard-code the email address so I didn't need to type it every time. Everything else is unchanged from the code on the above web page.

Thx,

Skip

smontanaro
  • 1,537
  • 3
  • 15
  • 26
  • possible duplicate of http://stackoverflow.com/q/36163375/1503886 – Jay Lee Mar 25 '16 at 19:45
  • @JayLee thanks for the response and the reference. As the group is owned by me, I created the client id & secret info from the dashboard, and my email is in the From: field, what more do I need to do to _"impersonate the user who owns the group"_ as indicated in the above thread? – smontanaro Mar 26 '16 at 01:13
  • poster in that thread is talking about service accounts: https://developers.google.com/identity/protocols/OAuth2ServiceAccount If you're not using a service account to authenticate then it's not relevant. You should update your question to include details of how you are authenticating (admin user, OAuth 2.0, show code, etc) – Jay Lee Mar 26 '16 at 13:45
  • Yes, I am using a service account. Well, I think I am. This program will operate at the shell prompt, read one or more mbox files full of emails, and pump them into a Google Group for archiving purposes. Seems like a pretty trivial exercise except for the authentication morass. I've created the service account. The quickstart script gets part the credential stage, then can't insert the mail message it's created into the group. – smontanaro Mar 26 '16 at 13:57
  • You need to post more details about how you are authenticating – Jay Lee Mar 26 '16 at 14:31
  • (The comment system is nuts too. Who in their right mind decided that you needed to use Shift-Return to enter a return???) Let's see... This has been a real trial-and-error adventure on my part. 1. Created project. 2. Enabled groups migration API. 3. In Credentials, created a service account. 4. In Manage Service Account, created a public/private key pair I can't seem to find a soup-to-nuts description of how this entire process is supposed to work. Every step has been like pulling teeth. – smontanaro Mar 26 '16 at 20:12

0 Answers0