Sorry I figured out the problem.
I didn't activate the provisioning API in the admin control panel.

But the problem of retrieveEmailList method not found still remains.
Is this an error?   Zend doesn't seem to have this method.





On Jul 2, 4:35 pm, cm_gui <[EMAIL PROTECTED]> wrote:
> Hi All
> I followed the instructions 
> here:http://code.google.com/apis/apps/gdata_provisioning_api_v2.0_referenc...
> and wrote this script (see below).
> But I got this "Expected response code 200, got403" error. See below.
> So the authentication did not really work.   How to make it work?
> I want to write a script to let all users manage all the mailing lists
> of the domain.
>
> Also, on 
> thishttp://code.google.com/apis/apps/gdata_provisioning_api_v2.0_referenc...
> page, there is a retrieveEmailList method.
> However it seems that Zend does not have such a method.  Using this
> retrieveEmailList will produce a method not found error.   
> Seehttp://framework.zend.com/manual/en/zend.gdata.gapps.html--- there is
> no retrieveEmailList method.
>
> Thank you
> gui
>
> ===
> My script
>
> require_once "Zend/Loader.php";
> Zend_Loader::loadClass('Zend_Gdata');
> Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
> Zend_Loader::loadClass('Zend_Gdata_Gapps');
>
> $email = "[EMAIL PROTECTED]";
> $password = "mypassword;
> $domain = "example.com";
>
> $client = Zend_Gdata_ClientLogin::getHttpClient($email, $password,
> Zend_Gdata_Gapps::AUTH_SERVICE_NAME);
> $service = new Zend_Gdata_Gapps($client, $domain);
>
> $feed = $service->retrieveAllRecipients('mymailinglist');
>
> foreach ($feed as $recipient) {
>    echo '  * ' . $recipient->who->email . "\n";
>
> }
>
> ---
> error
>
> Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with
> message 'Expected response code 200, got403' in
> /usr/local/share/ZendFramework/library/Zend/Gdata/App.php:286 Stack
> trace: #0
> /usr/local/share/ZendFramework/library/Zend/Gdata/Gapps.php(163):
> Zend_Gdata_App::import('https://www.goo...',
> Object(Zend_Http_Client), 'Zend_Gdata_Gapp...') #1
> /usr/local/share/ZendFramework/library/Zend/Gdata/App.php(132):
> Zend_Gdata_Gapps::import('https://www.goo...',
> Object(Zend_Http_Client), 'Zend_Gdata_Gapp...') #2
> /usr/local/share/ZendFramework/library/Zend/Gdata.php(110):
> Zend_Gdata_App->getFeed('https://www.goo...', 'Zend_Gdata_Gapp...') #3
> /usr/local/share/ZendFramework/library/Zend/Gdata/Gapps.php(398):
> Zend_Gdata->getFeed('https://www.goo...', 'Zend_Gdata_Gapp...') #4
> /usr/local/share/ZendFramework/library/Zend/Gdata/Gapps.php(1036):
> Zend_Gdata_Gapps->getEmailListRecipientFeed(Object(Zend_Gdata_Gapps_EmailListRecipientQuery))
>
> #5 /usr/local/share/ZendFramework/library/Zend/Gdata/Gapps.php(1054):
> Zend_Gdata_Gapps->retri in
> /usr/local/share/ZendFramework/library/Zend/Gdata/App.php on line 286
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to