Retrieve the unique contact ID with PHP

280 views
Skip to first unread message

Jean-Louis

unread,
Sep 23, 2011, 10:30:13 AM9/23/11
to google-co...@googlegroups.com
I'm building a simple app to connect and eventually sync my contacts with a local list hosted in MySQL.

The query for retrieving the data is $query = new Zend_Gdata_Query('http://www.google.com/m8/feeds/contacts/default/full');
That gives me everything (99.9%) about the contact, except for its ID, making the update impossible.

How do you access it? I'm talking about something that should look like http://www.google.com/m8/feeds/contacts/myemail%40gmail.com/base/125a5c8f49b1'

Thanks!


Alain Vongsouvanh

unread,
Sep 26, 2011, 7:16:06 AM9/26/11
to google-co...@googlegroups.com
Hello,

Please use SSL (https) over non-SSL (http) whenever possible. Your first query should look like:

Each entry should have a link element with its rel attribute set to "edit", use this link for subsequent request to the API in order to retrieve, update, or delete this contact.

Best,
Alain

--
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
google-co...@googlegroups.com
To unsubscribe from this group, send email to
google-contacts...@googlegroups.com
For more options, visit this group at
http://code.google.com/apis/contacts/community/forum.html



--
Alain Vongsouvanh | Developer Programs Engineer

Justin

unread,
Sep 26, 2011, 12:54:42 PM9/26/11
to google-co...@googlegroups.com
Jean, this is how I receive the ID

$id = rawurlencode($entry->id);

I also believe that Zend has a function, get_id().... but I decided not to use it, I didn't find it was quite right for me.

Reply all
Reply to author
Forward
0 new messages