pythongoogle-app-enginegoogle-apigoogle-appsgoogle-provisioning-api

Google Groups Provisioning: What am I missing here?


I'm trying to add a member to a Google group using the provision API. I've ran this in python with no success. I feel like I'm missing something obvious here... anybody?

import gdata.apps.groups.client
groupClient = gdata.apps.groups.client.GroupsProvisioningClient(domain='https://apps-apis.google.com/a/feeds/group/2.0/testtgroup123456')
groupClient.ClientLogin(email='myEmail@email.com', password='myPassword', source='apps')
groupClient.AddMemberToGroup('testtgroup123456', 'emailtoadd@email.com')

Solution

  • Google has recently added support for the Provisioning API to Standard/Free accounts. The domain parameter for GroupsProvisioningClient() should be your actual domain:

    import gdata.apps.groups.client
    groupClient = gdata.apps.groups.client.GroupsProvisioningClient(domain='email.com')
    groupClient.ClientLogin(email='myEmail@email.com', password='myPassword', source='apps')
    groupClient.AddMemberToGroup('testtgroup123456', 'emailtoadd@email.com')
    

    I've confirmed GAM allows me to provision groups for my Google Apps Standard domain using the same APIs