I need to delete an event, what I do is save the ID of the event in a database and then use that url thttpid.delete to remove it, but I get an error 402 forbidden
Code= 'XXXXxxXXXxx' // ClientLogin code
URL:='https://www.google.com/calendar/feeds/XXXX%40gmail.com/private/full/XXXXo8aqjok24794auifouXXXX' // ID GOOGLE EVENT
function TForm4.DeleteGoogle(Code,URL:String): String;
begin
idHTTP2.IOHandler:=IdSSLIOHandlerSocketOpenSSL1;
idHTTP2.Request.Connection := 'Keep-Alive';
idHTTP2.Request.ContentType := 'application/atom+xml';
idHTTP2.Request.CustomHeaders.Values['GData-Version']:='2.0';
idHTTP2.Request.CustomHeaders.Values['Authorization']:=('GoogleLogin Auth='+Code);
try
idHTTP2.Delete(URL);
except on E: EIdHTTPProtocolException do
idHTTP2.Delete(URL);
end;
//ID
Result:=(IdHTTP2.Response.Location);
end;
What is the url I need to delete this event?.