title: Google APIs Adding a contact using PeopleService
body: <p>I have a question about how correctly add a contact to Google Contacts using Google API.
  For authorization I use external Json file Generated.
  When I execute it , it doesn't give any mistakes but No Contact is Added to Google Contacts.
  What can be wrong with the code?
  Please find code below</p>
  <p>Thanks</p>
  <pre><code>        private async Task Run()
      {
  
          GoogleCredential credential;
  
          using (Stream stream = new FileStream(@&quot;D:\project1.json&quot;, FileMode.Open, FileAccess.Read, FileShare.Read))
          {
              credential = GoogleCredential.FromStream(stream);
          }
  
          string[] scopes = new string[] {
          PeopleServiceService.Scope.Contacts,
          PeopleServiceService.Scope.ContactsReadonly,
          PeopleServiceService.Scope.ContactsOtherReadonly,
          };
  
          credential = credential.CreateScoped(scopes);
  
          BaseClientService.Initializer initializer = new BaseClientService.Initializer()
          {
              HttpClientInitializer = (IConfigurableHttpClientInitializer)credential,
              ApplicationName = &quot;Project1&quot;,
              GZipEnabled = true,
          };
  
          PeopleServiceService service = new PeopleServiceService(initializer);
  
          Person contactToCreate = new Person();
  
          List&lt;Name&gt; names = new List&lt;Name&gt;();
          names.Add(new Name() { GivenName = &quot;Alex&quot;, FamilyName = &quot;Breen&quot;, DisplayName = &quot;Alex Breen&quot; });
          contactToCreate.Names = names;
  
          List&lt;PhoneNumber&gt; phoneNumbers = new List&lt;PhoneNumber&gt;();
          phoneNumbers.Add(new PhoneNumber() { Value = &quot;11-22-33&quot; });
          contactToCreate.PhoneNumbers = phoneNumbers;
  
          List&lt;EmailAddress&gt; emailAddresses = new List&lt;EmailAddress&gt;();
          emailAddresses.Add(new EmailAddress() { Value = &quot;AlexBreen@mail.com&quot; });
          contactToCreate.EmailAddresses = emailAddresses;
  
          PeopleResource.CreateContactRequest request = new PeopleResource.CreateContactRequest(service, contactToCreate);
  
          Person createdContact = request.Execute();
  
          Console.WriteLine(request);
  
      }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/1OECc.png" rel="nofollow noreferrer">Results</a></p>
  <p><a href="https://i.stack.imgur.com/lnzVf.png" rel="nofollow noreferrer">Metrics</a></p>