Jason,

What authentication token from Client Login are you using?
Please note that the Reporting API uses the SID token and not the Auth
token:

http://code.google.com/googleapps/domain/reporting/google_apps_reporting_api.html#Authentication

Claudio

On Fri, Aug 5, 2011 at 3:20 AM, Brian Mcnamara <[email protected]> wrote:

> For what it's worth you could take a look at sample code in some other
> languages -
> http://code.google.com/p/google-apps-reporting-api-client/downloads/list.
>  The Python version is using Client Login rather than OAuth.
>
> Regards,
> Brian
>
> Brian McNamara, Certified Google Apps Deployment Specialist
> Deployment Manager | LTech | [email protected] | 908-566-1728
>
>
>
> On Fri, Aug 5, 2011 at 1:02 AM, Robert Norris <[email protected]>wrote:
>
>> 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.
>>
>
>  --
> 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.
>

-- 
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