views:

129

answers:

2

Hi I am using 3-legged-oauth to import a users' Google contacts in my app. I did not find the ContactsClient library but i was using only the ContacsService and i was fetching the ContactsFeed but that resulted to not having a lot of data. After the user allows my apps i store the auth_token key and secret so i can run a cron task to fetch contacts' updates

I am using this code atm:

google = gdata.contacts.service.ContactsService(source=GOOGLE_OAUTH_SETTINGS['APP_NAME'])
google.SetOAuthInputParameters(GOOGLE_OAUTH_SETTINGS['SIG_METHOD'],           
                               GOOGLE_OAUTH_SETTINGS['CONSUMER_KEY'],
                               consumer_secret=GOOGLE_OAUTH_SETTINGS['CONSUMER_SECRET'])
access_token = gdata.auth.OAuthToken(user_oauth_token, user_oauth_secret)
access_token.oauth_input_params = google.GetOAuthInputParameters()
google.SetOAuthToken(access_token)
feed = google.GetContactsFeed()

When i try to use the contacts client

contacts_client = gdata.contacts.client.ContactsClient(
                         source=GOOGLE_OAUTH_SETTINGS['APP_NAME'])
feed2 = contacts_client.GetContacts(auth_token = access_token)

I get the following error (please note that the access_token is the same as above and I user 3-legged-oauth HMAC)

Actual results: File "/Library/Python/2.5/site-packages/atom/client.py", line 108, in request auth_token.modify_request(http_request)

A: 

Same to me... :(

Carlos Ricardo
A: 

Another vote for help here, this is causing us a lot of problems for us as well. We're trying to upload to YouTube but we'll get a 403 when we try to actually use the token even though we've gone through the exact process as outlined on Google's own OAuth page:

http://code.google.com/apis/gdata/docs/auth/oauth.html#UseAccessToken

kfarr