{"action":"created","issue":{"url":"https://api.github.com/repos/google/google-api-dotnet-client/issues/891","repository_url":"https://api.github.com/repos/google/google-api-dotnet-client","labels_url":"https://api.github.com/repos/google/google-api-dotnet-client/issues/891/labels{/name}","comments_url":"https://api.github.com/repos/google/google-api-dotnet-client/issues/891/comments","events_url":"https://api.github.com/repos/google/google-api-dotnet-client/issues/891/events","html_url":"https://github.com/google/google-api-dotnet-client/issues/891","id":198235463,"number":891,"title":"Authentication bug with Google Calendar API","user":{"login":"brunoklein99","id":11358728,"avatar_url":"https://avatars.githubusercontent.com/u/11358728?v=3","gravatar_id":"","url":"https://api.github.com/users/brunoklein99","html_url":"https://github.com/brunoklein99","followers_url":"https://api.github.com/users/brunoklein99/followers","following_url":"https://api.github.com/users/brunoklein99/following{/other_user}","gists_url":"https://api.github.com/users/brunoklein99/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoklein99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoklein99/subscriptions","organizations_url":"https://api.github.com/users/brunoklein99/orgs","repos_url":"https://api.github.com/users/brunoklein99/repos","events_url":"https://api.github.com/users/brunoklein99/events{/privacy}","received_events_url":"https://api.github.com/users/brunoklein99/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-31T15:06:42Z","updated_at":"2016-12-31T17:37:41Z","closed_at":null,"body":"I am trying to integrate with the calendar API and experiencing an authentication bug on which I can only add \"quick add\" events, not the normal ones. I posted a reproducible code bellow.\r\n\r\nThe second `ExecuteAsync` call throws a `Google.GoogleApiException` with message `Google.Apis.Requests.RequestError\r\nForbidden [403]\r\nErrors [\r\n\tMessage[Forbidden] Location[ - ] Reason[forbidden] Domain[global]\r\n]`. Like I said, I can normally add events with the \"Quick Add\" API\r\n\r\n```\r\nclass Program\r\n{\r\n    static void Main(string[] args)\r\n    {\r\n        Run().Wait();\r\n\r\n        Console.WriteLine(\"finished\");\r\n        Console.ReadLine();\r\n    }\r\n\r\n    private static async Task Run()\r\n    {\r\n        var certificate = new X509Certificate2(@\"C:\\Users\\klein-desk\\Downloads\\BakeABot-c56656b8bf4f.p12\", \"notasecret\", X509KeyStorageFlags.Exportable);\r\n\r\n        var credential = new ServiceAccountCredential(\r\n            new ServiceAccountCredential.Initializer(@\"bakeabot@bakeabot.iam.gserviceaccount.com\")\r\n            {\r\n                Scopes = new []{ CalendarService.Scope.Calendar },\r\n            }.FromCertificate(certificate));\r\n\r\n        var service = new CalendarService(new BaseClientService.Initializer()\r\n        {\r\n            HttpClientInitializer = credential\r\n        });\r\n        \r\n        var ev = new Event\r\n        {\r\n            Description = \"test event\",\r\n            EndTimeUnspecified = true,\r\n            Start = new EventDateTime() {DateTime = DateTime.Now},\r\n            \r\n        };\r\n\r\n        var list = service.CalendarList.List();\r\n\r\n        var l = await list.ExecuteAsync();\r\n\r\n        var id = l.Items[0].Id;\r\n\r\n        var insert = service.Events.Insert(ev, id);\r\n        var insertQuick = service.Events.QuickAdd(id, \"teste\");\r\n        try\r\n        {\r\n            //this works\r\n            var response1 = await insertQuick.ExecuteAsync();\r\n            //this throws\r\n            var response2 = await insert.ExecuteAsync();\r\n        }\r\n        catch (Exception e)\r\n        {\r\n            Debug.WriteLine(e.Message);\r\n        }\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/google/google-api-dotnet-client/issues/comments/269874959","html_url":"https://github.com/google/google-api-dotnet-client/issues/891#issuecomment-269874959","issue_url":"https://api.github.com/repos/google/google-api-dotnet-client/issues/891","id":269874959,"user":{"login":"brunoklein99","id":11358728,"avatar_url":"https://avatars.githubusercontent.com/u/11358728?v=3","gravatar_id":"","url":"https://api.github.com/users/brunoklein99","html_url":"https://github.com/brunoklein99","followers_url":"https://api.github.com/users/brunoklein99/followers","following_url":"https://api.github.com/users/brunoklein99/following{/other_user}","gists_url":"https://api.github.com/users/brunoklein99/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoklein99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoklein99/subscriptions","organizations_url":"https://api.github.com/users/brunoklein99/orgs","repos_url":"https://api.github.com/users/brunoklein99/repos","events_url":"https://api.github.com/users/brunoklein99/events{/privacy}","received_events_url":"https://api.github.com/users/brunoklein99/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T17:37:41Z","updated_at":"2016-12-31T17:37:41Z","body":"The issue does not happen if I supply a end time. Still a misleading message though."}}
{"actor":{"display_login":"brunoklein99"}}