I'm writing an application to manage customers my my soon-to-be business 
and I was successfully able to set appointments to my Google Calendar 
(handy for my Android phone), but I would also like to add my clients to my 
address book from the application as an added convenience. The issue I am 
having is that when I attempt to add a Contact, I get a "401 - 
Unauthorized" error. I can only assume this is because I'm not passing the 
acquired authentication to the Contacts client.

I'm very new to the Google API and it's all pretty overwhelming to me, but 
I've attached the code I use to do the Calendar appointments (which works) 
and to add Contacts. I set up the authorization in the gcalendar.py file 
with an added scope for Contacts, but every time I try to add a contact, I 
get the aforementioned error. Most of this is compiled from example code - 
so, quite honestly, I'm still a little sketchy on how it fits together 
(even after looking over the gdata-python-client documentation). I would 
assume that once the authorization is obtained it would carry on for all 
further requests for authorized services (and the authorization does ask 
for Calendar and Contacts access), but I initialize the Calendar service in 
a different way than I try to use Contacts. This is because I've seen no 
examples similar to the Calendar example for use with Contacts.

If somebody could point me in the right direction here it would be greatly 
appreciated.

P.S. I suppose it is worth noting that this is not a web-app but a console 
application as I believe it's referred to. It runs on my computer as a 
stand-alone Python application.

-- 
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