AuthSub token has wrong scope

I was playing around with the Google Data API last night and I kept running into this error. The app I’m creating allows me to pull down a list of Google Calendars and then insert a new entry into the calendar that I select. Pulling the list was the easy part, adding a new entry was the tough part.

My problem was that I was declaring a ‘scope’ that was too limiting for any additional calls to the API. Instead of declaring the scope for ‘allcalendars’, I reduced the scope to the largest URI possible which is ‘http://www.google.com/calendar/feeds’

Be sure to read this this doc about using AuthSub with JavaScript before diving into the Google Data API http://code.google.com/apis/gdata/authsub-js.html