Hi Anirudh,
I use the C#(.Net) to do this function.
Contact API samples on the google for entry Update and Insert cant
work for me.
http://code.google.com/intl/zh-TW/apis/contacts/docs/2.0/developers_guide_dotnet.html#Creating
A bug or??

The http status code is ProxyAuthenicationRequired(407).
But I have gave my proxy information to the contact service.


On 2月3日, 下午2時29分, Anirudh S <[email protected]> wrote:
> Hi Charles,
>
> I was speaking from my experience in a PHP script I wrote. Looks like you're
> using something else. Java, perhaps? Are you using the API library too?
>
> If it's of any help, I used the following code in PHP (using libcurl) to set
> the Auth header :
>
> $auth_header = array("Authorization: GoogleLogin auth=$auth_token");
> curl_setopt($Curl_Handle,CURLOPT_HTTPHEADER,$auth_header);
>
> Maybe there's something similar in the language you're using?
>
> But then if your entry.Delete() works and entry.Update fails the problem
> might be something else entirely.
>
> Best,
> Anirudh
>
> 2009/2/3 Charles <[email protected]>
>
>
>
>
>
> > Hi Anirudh,
> > Many thanks to your reply.
> > But how can I set the header if I use ClientLogin.
> > Just like
> > ContactsService service = new ContactsService("MyGoogleContact");
> > service.setUserCredentials("[email protected]", "password");
>
> > It's confused that I can do entry.Delete(), it is fine.
> > But entry.Update will fail.
>
> > On 2月3日, 上午11時16分, Anirudh S <[email protected]> wrote:
> > > Have you set the authentication header properly? You have to set a header
> > > like this -
>
> > > Authorization: GoogleLogin auth=yourAuthToken
>
> > > Do check if this header is set properly. To make absolutely sure you can
> > use
> > > a packet capturing tool (Wireshark?).
>
> > > Good luck,
> > > Anirudh
>
> > > 2009/2/2 Charles <[email protected]>
>
> > > > Sorry, I forgot to say,
> > > > I used the ClientLogin username/password authentication.
>
> > > > On 2月3日, 上午1時02分, Charles <[email protected]> wrote:
> > > > > Hi all,
> > > > > I have tried the Google Contact API to get my contacts.
> > > > > But something error while I want to update someone's contact
> > > > > information.
>
> > > > > I got the exception like this,
>
> > http://www.google.com/m8/feeds/contacts/[email protected]/full/1233590686244000
> > > > > and the page says that:
> > > > > Authorization required
> > > > > Error 401
>
> > > > > Did I miss somrthing for updating contact?
>
> --
> Anirudh Surendranath
> SmartCrowds Software Pvt Ltd
> email  : [email protected]
>          : anirudh[DOT]mail[AT]gmail[DOT]com
--~--~---------~--~----~------------~-------~--~----~
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