c# - Retrieve google contact based on contact Id -


when issue contacts request of user's contacts contacts id's of form:

http://www.google.com/m8/feeds/contacts/sometestaccount%40gmail.com/base/4f822c758a541b6b 

reading google contacts api 3.0 bit confused on uri should use delete contact. doing:

var cr = new contactsrequest(settings); var uri = new uri("http://www.google.com/m8/feeds/contacts/sometestaccount%40gmail.com/base/4f822c758a541b6b"); var contact = cr.retrieve<contact>(uri); cr.delete(contact); 

fails with

google.gdata.client.gdatarequestexception : execution of request returned unexpected result: http://www.google.com/m8/feeds/contacts/sometestaccount%40gmail.com/base/4f822c758a541b6b?max-results=50movedpermanently 

what's correct way contact id , request contact deletion? in advance.

i did research on , found 2 errors.

1) got "moved permanently because issued request in http , should have done in https.

2) uri format strictly :

https://www.google.com/m8/feeds/contacts/{useremail}/full/{contactid} 

i had setting.pagesize = 50 , caused uri be

https://www.google.com/m8/feeds/contacts/{useremail}/full/{contactid}?max-results=50 

which invalid , returns 400 bad request.

the contact id hash code contact.id result uri. after retrieve contact entry, deletion documented in google api contacts v3.0 .


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -