I have what I think is a fairly trivial task, create a Google group and insert messages from a now defunct mailing list so those messages are more easily searched, linked and cataloged. I plan to use the Groups Migration API, but I can't get past all the rigamarole necessary to authenticate myself.
I created a project on the Developer's Console, created new OAuth ID and secret, then downloaded them. I enabled the Groups Migration and Groups Setting APIs, leaving the others which were already enabled alone. I installed the google-api-client code using pip. I downloaded and untarred the client samples (v 1.2), then in the samples/groupsettings directory, copied in the credentials JSON as client_secrets.json. I created a Google Group to receive the messages. Then I executed:
For my trouble I got this:
Traceback (most recent call last):
File "groupsettings.py", line 169, in <module>
main(sys.argv)
File "groupsettings.py", line 166, in main
access_settings(service=service, groupId=options.groupId, settings=settings)
File "groupsettings.py", line 77, in access_settings
g = group.get(groupUniqueId=groupId).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 729, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 500 when requesting https://www.googleapis.com/groups/v1/groups/old-cr-archive%40googlegroups.com?alt=json returned "Backend Error">
The searching I've done for this backend error has so far turned up nothing useful.
I have several questions rolling around in my brain, none of which I know how to debug:
- Have I properly set up authorization?
- Do I need to set some parameters of the group through the web interface to allow this example to work?
- Is the example code even correct?
Any clues about how to proceed who be much appreciated.
Thanks,
Skip Montanaro