Trouble getting started with Google API example

93 views
Skip to first unread message

Skip Montanaro

unread,
May 14, 2015, 12:28:57 PM5/14/15
to google-api-p...@googlegroups.com
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:

python2.7 groupsettings.py --groupId=old-cr-...@googlegroups.com --whoCanPostMessages=NONE_CAN_POST

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

Kevin Klues

unread,
Sep 3, 2015, 12:21:04 PM9/3/15
to Google API Python Client
Where you ever able to resolve this?  I am having a similar problem.  Thanks.
Reply all
Reply to author
Forward
0 new messages