Hello all,
I try to create an event using ClientLogin like explained in the API
developers guide.
I succeed in receiving the auth token, but when I try to post the
calendar-event I receive an 401-Error. What I do is:
<code>
URL url = new URL("http://www.google.com/calendar/feeds/default/
private/full");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestProperty("CONTENT-TYPE", "application/atom+xml");
con.setRequestProperty("Authorization", "GoogleLogin
"+this._authToken);
con.setRequestMethod("POST");
con.setDoOutput(true);
OutputStreamWriter oswr = new OutputStreamWriter(con.getOutputStream
());
oswr.write(this._calendarEntry);
oswr.flush();
</code>

this._authToken ist the token I received from "https://www.google.com/
accounts/ClientLogin"
this._calendarEntry is the calendar entry as described in the dev-
guide.

Here is an example for the response:
Server returned HTTP response code: 401 for URL:
http://www.google.com/calendar/feeds/default/private/full?gsessionid=YUz2yTAFNVFB4NiCxBsGCA

Has anybody an idea what goes wrong?

Thanks,
Martin

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