title: Getting name, gender, location of "me" from GoogleApiClient
body: <p>In an Android app I have followed the example <a href="https://developers.google.com/android/guides/api-client" rel="nofollow noreferrer">Accessing Google APIs</a> sofar that the <code>GoogleApiClient</code> connection is successful and the <code>onConnected</code> callback is called.</p>
  
  <p>However the Google's example stops there and I don't know how to retrieve the <strong>name</strong>, <strong>gender</strong> and <strong>location</strong> of myself (also known as <strong>me</strong> in JavaScript+PHP SDK for Google+ that I had used some time ago).</p>
  
  <p>Here is the Java code (retrying and rotation handling skipped for brevity, it seems to work) why is <code>me</code> is null?</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      mGoogleApiClient = new GoogleApiClient.Builder(this)
              .addConnectionCallbacks(this)
              .addOnConnectionFailedListener(this)
              .addApi(Plus.API)
              .addScope(Plus.SCOPE_PLUS_PROFILE)
              .build();
  }
  
  @Override
  protected void onStart() {
      super.onStart();
      mGoogleApiClient.connect();
  }
  
  @Override
  public void onConnected(Bundle bundle) { // why is me null?
  
      Person me = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);
  
      Person.Name name = me.getName();
      String given = name.getGivenName();
      String family = name.getFamilyName();
  
      Log.d(TAG, "Given: " + given + ", Family: " + family);
  }
  </code></pre>
  
  <p>Please advise how to fetch the data of the logged in user from Google+</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>What I have tried to solve my problem:</p>
  
  <p>1) I have added <code>.addScope(Plus.SCOPE_PLUS_LOGIN)</code> to the builder call.</p>
  
  <p>2) I have added 2 more permissions to AndroidManifest.xml:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.USE_CREDENTIALS" /&gt;
  &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
  </code></pre>
  
  <p>In the <a href="https://console.developers.google.com" rel="nofollow noreferrer">Google Developers Console / Credentials</a> I have put both the keys from my real keystore and from .android\debug.keystore:</p>
  
  <p><a href="https://i.stack.imgur.com/InAvu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/InAvu.png" alt="console"></a></p>
  
  <p><strong>I don't understand where/if to use the "Client IDs" show above?</strong></p>
  
  <p><strong>And I only have 2 APIs enabled: Google+ and GCM - is maybe more needed?</strong></p>
  
  <p><a href="https://i.stack.imgur.com/vQBNE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vQBNE.png" alt="api"></a></p>
  
  <p>3) Finally, I have called</p>
  
  <pre><code>adb shell setprop log.tag.GooglePlusPlatform VERBOSE
  </code></pre>
  
  <p>and have seen the following error:</p>
  
  <pre><code>E/Volley  ( 3890): [594] BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/plus/v1/people/me
  D/GooglePlusPlatform( 3890): Unexpected response code (403) when requesting: getPerson
  W/GooglePlusPlatform( 3890): {"errors":[{"domain":"usageLimits","reason":"accessNotConfigured","message":"Access Not Configured. The API (Google+ API) is not enabled for your project. Please use the Google Developers Console to update your configuration."}],"code":403}
  </code></pre>
  
  <p>I am using a real device (HTC M9) and my app is not published yet.</p>