title: How to get email addresses while fetching google contacts in angular 10
body: <p>I am trying to get email of google contacts using people API and oAuth2.0. I am able to get all data except email. Any Suggestions</p>
  <p>app.module.ts</p>
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { HttpClientModule } from '@angular/common/http';
  
  import {
    GoogleApiModule, 
    GoogleApiService, 
    GoogleAuthService, 
    NgGapiClientConfig, 
    NG_GAPI_CONFIG,
    GoogleApiConfig
  } from &quot;ng-gapi&quot;;
  
  let gapiClientConfig: NgGapiClientConfig = {
    client_id: &quot;&lt;Client_id&gt;&quot;,
    discoveryDocs: [&quot;https://www.googleapis.com/discovery/v1/apis/people/v1/rest&quot;],
    scope:[
      &quot;https://www.googleapis.com/auth/contacts&quot;,
      &quot;https://www.googleapis.com/auth/contacts.readonly&quot;,
      &quot;https://www.googleapis.com/auth/userinfo.email&quot;,
      &quot;https://www.googleapis.com/auth/userinfo.profile&quot;
  ].join(&quot; &quot;)
  };
  
  import { AppComponent } from './app.component';
  
  @NgModule({
    declarations: [
      AppComponent
    ],
    imports: [
      BrowserModule,
      HttpClientModule,
      GoogleApiModule.forRoot( {
              provide: NG_GAPI_CONFIG,
              useValue: gapiClientConfig
          })
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  <p>app.component.ts</p>
  <pre><code>import { Component } from '@angular/core';
  import { GoogleAuthService } from &quot;ng-gapi&quot;;
  import { GoogleApiService } from &quot;ng-gapi&quot;;
  import { HttpClient, HttpHeaders } from '@angular/common/http';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
  })
  export class AppComponent {
    title = 'test-gapi';
  
    constructor(private googleAuthService: GoogleAuthService, private gapiService: GoogleApiService, private _http:HttpClient){
      this.gapiService.onLoad().subscribe(resuult =&gt; {
        console.log(resuult);
      });
    }
  
    signIn(){
      this.googleAuthService.getAuth().subscribe( auth =&gt; {
        auth.signIn().then(() =&gt; {
          let access_token = auth.currentUser.get().getAuthResponse().access_token;
          const headers = new HttpHeaders()
            .set('Access-Control-Allow-Origin',  'http://localhost:4200');
          console.log(access_token);
          this._http.get&lt;any&gt;('https://people.googleapis.com/v1/people/me/connections' + `&amp;access_token=${access_token}`, {'headers' : headers}).subscribe(result =&gt; {
            console.log(result);
          })
  
        });
      });
    }
  }
  </code></pre>
  <p>I have defined scope properly as well. I have even checked in google API explorer, we are not getting email even there. I fetched everything in result except email of all contacts. Please provide any suggestions or any other way out to get google contacts</p>