1

I have an appengine project where I am attempting to add a user to a Google group.

I am using a GroupsProvisioningClient in order to do so. When I add a certain user to the group the code appears to work (no error is reported) but the user doesn't show up in the groups front end, not if I loop through RetrieveAllMembers.

When I attempt to RetrieveGroupMember('group_email', 'user_email') I get an error:

<error errorCode="1301" invalidInput="user@gmail.com" reason="EntityDoesNotExist" />

But when I attempt to manually add this user in the groups front end I also get an error:

user@gmail.com is already in this group

So I'm not sure what's going in, is or isn't my user in the group? How can I check? Is my code wrong?

client = gdata.apps.groups.client.GroupsProvisioningClient(domain=settings.DOMAIN)
client.ssl = True
client.auth_token = gdata.gauth.OAuthHmacToken(settings.OAUTH_CONSUMER_KEY, settings.OAUTH_CONSUMER_SECRET, access_token.token, access_token.token_secret, gdata.gauth.ACCESS_TOKEN)
client.AddMemberToGroup('group_email', 'user_email')
client.RetrieveGroupMember('group_email', 'user_email')
4

0 回答 0