Ok I solved it. The problem was not because of Etag but this:

"If you want to delete the contact regardless of whether someone else
has updated it since you retrieved it, then use If-Match: * and don't
include the ETag. (In this case, you don't need to retrieve the
contact before deleting it.)"


Thank you




On Feb 25, 8:28 pm, Nicolas Garnier <[email protected]> wrote:
> Hi ercanik,
>
> I think this is because the etag is missing, when deleting you will need to
> tell the contacts API if you want it to let you know if there is a potential
> conflict.
> The 
> documentation:http://code.google.com/apis/contacts/docs/3.0/developers_guide_protoc...
> you tu use the HTTP header If-Match:
> * or If-Match: <etag> if you only want to delete if the etag is matching.
>
> Cheers!
> *
> Nicolas Garnier*
> Developer Programs Engineer
> Google Developer Relations*
> Google Switzerland GmbH.
> Brandschenkestrasse 110,
> 8002 Zurich,
> Switzerland
> *
>
> *The above terms reflect a potential business arrangement, are provided
> solely as a basis for further discussion, and are not intended to be and do
> not constitute a legally binding obligation. No legally binding obligations
> will be created, implied, or inferred until an agreement in final form is
> executed in writing by all parties involved.
>
> This email may be confidential or privileged. If you received this
> communication by mistake, please don't forward it to anyone else, please
> erase all copies and attachments, and please let me know that it went to the
> wrong person. Thanks
>
> --
>
> **“When I’m being sad, I stop being sad and be awesome instead”**
> *
>
>
>
> On Wed, Feb 23, 2011 at 12:13 AM, ercanik <[email protected]> wrote:
> > I got "Missing resource version ID" error when trying to delete a
> > contact. Anybody have an idea?
>
> > function delete($url, $token)
> > {
> >      $ch = curl_init();
> >      curl_setopt($ch, CURLOPT_CUSTOMREQUEST,"DELETE");
> >      curl_setopt($ch, CURLOPT_URL, $url);
> >      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> >      $curlheader[0] = sprintf("Authorization: AuthSub token=\"%s\"/
> > n   GData-Version:\"3.0\" ", $token);
> >      $curlheader[1] = 'Content-Type: application/atom+xml';
> >      curl_setopt($ch, CURLOPT_HTTPHEADER, $curlheader);
> >      curl_setopt($ch, CURLOPT_HEADER, 1);
>
> >      $output = curl_exec($ch);
> >      curl_close($ch);
> >      return $output;
> > }
>
> > $sXML =delete('https://www.google.com/m8/feeds/contacts/default/base/
> > 490964cf0a5b2737', $tokd);
> >  print_r ($sXML);
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Google Contacts, Shared Contacts and User Profiles 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://code.google.com/apis/contacts/community/forum.html- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles 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://code.google.com/apis/contacts/community/forum.html

Reply via email to