I'm trying to use the OAuth Token I get from django-social-auth to access the users calendars.
So in the django-social-auth configuration I set:
GOOGLE_CONSUMER_KEY = 'anonymous'
GOOGLE_CONSUMER_SECRET = 'anonymous'
GOOGLE_OAUTH_EXTRA_SCOPE = ['https://www.google.com/calendar/feeds/']
When the user comes back from google, I get an entry in the database which lookes like this:
{u'access_token': u'oauth_token_secret=vvvv&oauth_token=xxxx'}
But now, when I try do something like this:
import gdata.calendar.client
client = gdata.calendar.client.CalendarClient()
client.auth_token = gdata.gauth.OAuthHmacToken('anonymous', 'anonymous', 'xxxx', 'vvvv', gdata.gauth.ACCESS_TOKEN)
client.GetOwnCalendarsFeed()
I always get:
gdata.client.Unauthorized: Unauthorized - Server responded with: 401
<HEAD>
<TITLE>Token invalid - Invalid AuthSub token.</TITLE>
</HEAD>
What am I missing here?