I am trying to include Google sign in in my android application using Google+ Api. I am able to take account details from the user but once signed in I am getting null when requesting for username using call:
Plus.PeopleApi.getCurrentPerson(mGoogleApiClient).getDisplayName()
And Logcat shows:
BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/plus/v1/people/me
Although I am able to get email of the user using:
Plus.AccountApi.getAccountName(GoogleClient.mGoogleApiClient)
Please help me to discover my mistake
I have tried same code and its working fine! So, just ensure two things:
1)Register your digitally signed .apk file's public certificate in the Google APIs Console.Link below:
https://developers.google.com/+/mobile/android/getting-started#step_1_enable_the_google_api
2)Make sure you have added the google+ api access and have client key created with SHA1.
Rest is fine.