Hi,

Maybe this old thread can help:
http://groups.google.com/group/google-contacts-api/browse_thread/thread/f6dcf92775f8549/9dc962ddd20af598

Cheers,
Julian.

On Aug 10, 1:48 pm, Fish <[email protected]> wrote:
> Hi everyone,
>
> While trying to access the google API through cURL to get my contacts,
> I am getting a Google error code 'Bad request - Your client has issued
> a malformed or illegal request.'.
>
> Before that, I was actually getting something but which is not the
> Atom 1.0 xml expected.
>
> Could you help me, I may be fogetting something in the process.
>
> Here is my code for the request :
>
> $ch = curl_init();
>
>       $headers[] = 'Content-Type: application/x-www-form-urlencoded';
>       $headers[] = 'Authorization: AuthSub token='. 
> $request->getParameter('token');
>
>       $headers[] = 'User-Agent: Java/1.5.0_06';
>       $headers[] = 'Host:www.google.com';
>       $headers[] = 'Accept: text/html, image/gif, image/jpeg, *; q=.2,
> */*; q=.2';
>       $headers[] = 'Connection: keep-alive';
>
>       curl_setopt($ch, CURLOPT_URL, 'www.google.com/m8/feeds/contacts/
> default/full HTTP/1.1');
>       //curl_setopt($ch, CURLOPT_POST, false);
>       curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
>       curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
>
>       $this->result = curl_exec($ch);
>
> The process is : I direct the user to the link to AuthSub which gets
> me back a token in a get parameter.
>
> I use this one in the get request above and I expect to get the
> response with my contact list, and that does not happen.
>
> Any idea ?
>
> Thanks in advance,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Contacts API" 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-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to