Sunday, 15 May 2011

Google Groups PHP API Get existing Group -


The group is trying to access PHP API and get existing group settings and members.

divideandconquer .se, I have modified my code:

  function get_google_group ($ groupId) {$ group = false; Try {echo '& lt; Br / & gt; Getting Google Groups: '. $ Group ID '& lt; Br / & gt; '; $ MyClient = $ this- & gt; GetClient (); $ MyClient- & gt; AdScope ('https://www.googleapis.com/auth/apps.groups.settings'); $ GroupsettingsService = New Google_Service_Groupssettings ($ myClient); $ Group = $ groupsettingsService- & gt; Group-> Obtain ($ groupId); Echo 'success: group ='; } Hold (exception $ E) {echo '& lt; Br / & gt; *** Avatar *** '$ E- & gt; Received message () '& lt; Br / & gt; '; return false; } Return group $; }  

I am still getting an exception: on the 'received' method to call:

  Getting Google Groups: 04k668n33tdjvkw *** Incomplete ** * GET https://www.googleapis.com/groups/v1/groups/04k668n33tdjvkw Error calling: (403) GDita inadequate messages inadequate permission  

< Div class = "post -text" itemprop = "text">

Do not use directly Google_Service_Groupssettings_Groups_Resource . Use Google_Service_Groupssettings , like this:

  $ myClient-> AddScope ('https://www.googleapis.com/auth/apps.groups.settings'); $ GroupsettingsService = New Google_Service_Groupssettings ($ myClient); $ Group = $ groupsettingsService- & gt; Group-> Obtain ($ groupId);  

No comments:

Post a Comment