Problem in retrieving Contacts

6 views
Skip to first unread message

cingularg

unread,
Dec 31, 2008, 5:51:33 AM12/31/08
to Google Contacts API
Hi,

I am facing problem while trying to retrieve contacts feed.
'ClientLogin' request goes fine and i get the SID, LSID and Auth
values

https://www.google.com/accounts/ClientLogin [POST]

accountType=GOOGLE&Email=te...@gmail.com&Passwd=test123
&service=cp&source=Jagg-GConnector-1.00

for contacts feed i am sending like

http://www.google.com/m8/feeds/contacts/myEmailid/full?&alt=atom&start-index=1&max-results=10
[GET]

connection.setRequestProperty("GData-Version", "2");
connection.setRequestProperty("Authorization", "GoogleLogin
auth="+AuthToken);
connection.setRequestProperty("Content-Type", "application/x-www-form-
urlencoded");

getting 401: "Unauthorized" error.

correct me if something is wrong in the request or parameters.
thnx in advance

cing

Khallaf

unread,
Jan 5, 2009, 1:12:57 AM1/5/09
to Google Contacts API
'...............................................................................................
Dim x As New GData.Contacts.ContactsService("ConSVC") ' :)
x.setUserCredentials(YourFullEMailAddress, Password)
Dim contaCOL = x.Query(New GData.Contacts.ContactsQuery("http://
www.google.com/m8/feeds/contacts/YourFullEMailAddress/full?max-results=999"))
' to get a bigger contact collection, increase the number as you may
wish!!
For Each conta In contaCOL.Entries
Dim conEntry As GData.Contacts.ContactEntry = TryCast
(conta, GData.Contacts.ContactEntry)
'
'some loop code
'
Next
'...............................................................................................


BR,

Khallaf







On Dec 31 2008, 12:51 pm, cingularg <cingul...@gmail.com> wrote:
> Hi,
>
> I am facing problem while trying to retrieve contacts feed.
> 'ClientLogin' request goes fine and i get the SID, LSID and Auth
> values
>
> https://www.google.com/accounts/ClientLogin [POST]
>
> accountType=GOOGLE&Email=t...@gmail.com&Passwd=test123
> &service=cp&source=Jagg-GConnector-1.00
>
> for contacts feed i am sending like
>
> http://www.google.com/m8/feeds/contacts/myEmailid/full?&alt=atom&star...

test.gcr

unread,
Jan 7, 2009, 6:50:31 AM1/7/09
to Google Contacts API
Hi Khallaf,

i mean like without using GData services, we cannot get the contacts
in XML
its out of curiosity.

thnx
Gcr

On Jan 5, 11:12 am, Khallaf <mkhal...@gmail.com> wrote:
> '...............................................................................................
> Dim x As New GData.Contacts.ContactsService("ConSVC") ' :)
> x.setUserCredentials(YourFullEMailAddress, Password)
> Dim contaCOL = x.Query(New GData.Contacts.ContactsQuery("http://www.google.com/m8/feeds/contacts/YourFullEMailAddress/full?max-result..."))

Khallaf

unread,
Jan 10, 2009, 7:44:02 PM1/10/09
to Google Contacts API
You actually can, if you are a GApps domain admin. To prove it to
yourself, try debugging with cURL...

Ref: http://code.google.com/support/bin/answer.py?answer=78451

On Jan 7, 1:50 pm, "test.gcr" <test....@gmail.com> wrote:
> Hi Khallaf,
>
> i mean like without using GData services, we cannot get the contacts
> in XML
> its out of curiosity.
>
> thnx
> Gcr
>
> On Jan 5, 11:12 am, Khallaf <mkhal...@gmail.com> wrote:
>
> > '...............................................................................................
> > Dim x As New GData.Contacts.ContactsService("ConSVC") ' :)
> > x.setUserCredentials(YourFullEMailAddress, Password)
> > Dim contaCOL = x.Query(New GData.Contacts.ContactsQuery("http://www.google.com/m8/feeds/contacts/YourFullEMailAddress/full?max......"))
Reply all
Reply to author
Forward
0 new messages