title: Using Google API to modify google contacts
body: <p>I want to start developing with Google API’s with a .NET client. For first step I tried to get all google contacts and now I want to insert contacts.
  I have read a lot about Google API’s to CRUD (create, read, update and delete) contacts. There are the Contact API, the People API and other(?). What is the best way to CRUD contacts?</p>
  
  <pre><code>UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
    new ClientSecrets
    {
      ClientId = "xyz.apps.googleusercontent.com",
      ClientSecret = " xyz"
    },
    new[] { "profile", "https://www.google.com/m8/feeds/contacts/xy%40gmail.com/full" },
    "me",
    CancellationToken.None).Result;
  
  // Create the service.
  var peopleService = new PeopleService(new BaseClientService.Initializer()
  {
    HttpClientInitializer = credential,
    ApplicationName = "WindowsClient-Google-Sync",
  });
  
  ListRequest listRequest = peopleService.People.Connections.List("people/me");
  listRequest.SyncToken = null;
  ListConnectionsResponse result = listRequest.Execute();
  
  foreach (Person person in result.Connections)
  {
    foreach (Name name in person.Names)
    {
      Console.WriteLine("Name: " + name.DisplayName);
    }
  }
  </code></pre>
  
  <p>How can I extend this sample to create or update contacts? </p>
  
  <p>Thanks</p>
  
  <p>Andreas</p>