Savago wrote:
> Currently, I'm struggling to implement 'adding a new entry'
> functionality.
>
> There is a part of google calendar protocol specification that I think
> is a little bit confusing. In 'creating single occurrence events',
> there is the following paragraph:
>
> "
> If you received the redirect, then send the same POST request again,
> with the same Authorization header and the same content, but with the
> gsessionid parameter appended.
> "
>
> I assume that gsessionid should be added in the HTTP header. And so I
> did it, sending a new request with the following header (source code
> gcal.c:gcal_create_event, in line 594):
>
> "
> Authorization: GoogleLogin
> auth=DQAAAHMAAADMep7apQOyMvWP0Cn06ObGT1gmQfMOA4r9YVREwlFnDE9T6gjsuG9EyMG85-
> dTMJgSsplKnelETp73GKo5t8M3SObzAXhsET1WG9sVdnzFOGJvZK6V6kCxPPpIXbKlRGCO39sD8HSis2uo1wsUOUlQvQtXN9y_Nj9a_rh3otNhAQ
>  gsessionid=xKH9fRV783hSfG5lBhT9nw
> "
>
> But the request fails with HTTP code 401 and returns a webpage with
> "Token invalid".
>
> Any of you guys known what is missing or what I did wrong here?
>   

Savago,

Nice job getting so far with this. I look forward to looking at your code.

Your mistake is that the gsessionid should be used as a query parameter, 
not as an HTTP header. This query parameter is appended to the original 
POST uri for the calendar. As far as I can tell these POST requests are 
always redirected and the redirect location (with appended gsessionid) 
is always specified in the response, so the documentation would be 
clearer if it said,

"When you receive the redirect,  send the same POST request, with the 
same Authorization header, to the location specified in the response 
location."

Hope that helps,

Ray

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" 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://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to