title: .net google calendar api : anybody can create/update/delete events
body: <p>In my application, i am using google calendar api.
  i have created client id and client secret for my account as well as for few users.
  when i run the application, if i am not logged in to the browser it ask me login to my gmail account. once i log in to my gmail account, i can successfully get/create/update/delete events on my calendar.</p>
  
  <p>currently i am loggedin with my calendar id to gmail account, i am able to get the events for different calendar id but the is i am not able to create/update/delete events by another user calendar id.</p>
  
  <p>my requirement is, i am logged in to my gmail id lets say abc@gmail.com and i am able to fetch events for calendar  id xyz@gmail.com but not able to  create/update/delete events for calendar id xyz@gmail.com</p>
  
  <p>i did lot of research on internet but did not find anything. as per my knowledge we need to pass authorization + access token to the request. i tried this also but did not work.</p>
  
  <p>Please suggest what should i do to achieve this requirement.</p>
  
  <pre><code>calID = Convert.ToString(Session["CalenderId"]);
          userSecret = Convert.ToString(Session["UserSecret"]);
  
          if (!string.IsNullOrEmpty(calID) &amp;&amp; !string.IsNullOrEmpty(userSecret))
          {
              using (var stream =
                  new FileStream(userSecret, FileMode.Open, FileAccess.Read))
              {
                  string credPath = System.Environment.GetFolderPath(
                      System.Environment.SpecialFolder.Personal);
                  credPath = Path.Combine(credPath, ".credentials/calendar-dotnet-quickstart.json/" + calID);
  
                  credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
                      GoogleClientSecrets.Load(stream).Secrets,
                      Scopes,
                      "user",
                      CancellationToken.None,
                      new FileDataStore(credPath, true)).Result;
                  // Response.Write("Credential file saved to: " + credPath);
              }
  
              // Create Google Calendar API service.
              var service = new CalendarService(new BaseClientService.Initializer()
              {
                  HttpClientInitializer = credential,
                  ApplicationName = ApplicationName,
  
              });
  </code></pre>
  
  <p>Hope you have understood my requirement. waiting for earliest response.
  Thank you.</p>