I've only ever been able to get the Reporting API working using OAuth -
ClientLogin has never worked for me, and gives me the same error that you
see. It could be me doing something wrong but I remember spending a couple
of hours on it at the time before giving up and switching to OAuth.



On Fri, Aug 5, 2011 at 12:57 AM, Jason Funk <[email protected]> wrote:

> I'm probably just doing something wrong, but I'm unsure what it is:
>
> I use the ClientLogin Authentication to generate a token, then use the
> following (in test phase) Perl code to submit a request:
>
> my $lwp = LWP::UserAgent->new;
> my $xml = <<EOM;
> <?xml version="1.0" encoding="UTF-8"?>
> <rest xmlns="google:accounts:rest:protocol"
>     xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance ">
>     <type>Report</type>
>     <token>$auth_token</token>
>     <domain>$domain</domain>
>     <date>2011-08-04</date>
>     <reportType>daily</reportType>
>     <reportName>accounts</reportName>
> </rest>
> EOM
>
> my $url = '
> https://www.google.com/hosted/services/v1.0/reports/ReportingData';
> $response = $lwp->post($url,
>     'Content_Type' => 'application/atom+xml; charset=UTF-8',
>     'Content' => $xml
> );
>
> And the response:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <hs:rest xmlns:hs="google:accounts:rest:protocol">
>     <hs:status>Failure(2001)</hs:status>
>     <hs:reason>InternalError(1011)</hs:reason>
>     <hs:extendedMessage>No extended message available for this
> error.</hs:extendedMessage>
>     <hs:result></hs:result>
>     <hs:type></hs:type>
> </hs:rest>
>
> Am I required to encode the xml like with standard POSTs?  Pass it in with
> a certain variable name?  Or is there possibly an issue right now with the
> API?
>
> Any/all help is MUCH appreciated.
>
> THANX!
>
> Jason
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Apps Domain Information and Management APIs" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-apps-mgmt-apis/-/SawA6_HsJ24J.
> 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-mgmt-apis?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Apps Domain Information and Management 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-mgmt-apis?hl=en.

Reply via email to