403 Message: Legacy People API has not been used in project [duplicate] 403 Message: Legacy People API has not been used in project [duplicate] asp.net asp.net

403 Message: Legacy People API has not been used in project [duplicate]


You don't need to install any other APIs like Google Drive API, Google Sheets API or other except Google+ API,

The error is coming because of "passport-google-oauth": "^1.0.0"

Just change the version "passport-google-oauth": "^1.0.0" to "passport-google-oauth": "^2.0.0" and remove node_modules and package.lock.json file and run "npm i"

That's it


Before the Google+ API Shutdown on March 7, 2019, the people.get and people.getOpenIdConnect methods were available for requesting a person’s profile.

To avoid breaking existing integrations with these methods supporting sign-in, a new minimal implementation only returns basic fields necessary for that functionality, such as name and email address, if authorized by the user. The Legacy People API is where these methods will remain available for existing callers at the existing HTTP endpoints.

The Legacy People API serves a limited new implementation of the legacy Google+ API people.get and people.getOpenIdConnect methods necessary for maintaining sign-in functionality. It is available to existing callers of the original methods that haven't migrated to recommended replacements such as Google Sign-in or Google People API at the time of the Google+ API shutdown.

enter link description here

Thanks


In this case, I'm facing the same issue. This is what I've done to fix it.

Situation:

  • NodeJS ver 8
  • "passport-google-oauth": "^1.0.0"
  • Using Google+ API as Google Sign-in

When I run the apps and click Sign in with Google, what happened then?

How I solve it?

  • Go to Google Console
  • Click on Google+ API under Social APIs, then click Enable API
  • Click on Google Drive API under G Suite, then click Enable API
  • Click on Google Sheets API under G Suite, then click Enable API
  • Update "passport-google-oauth": "^1.0.0" to "passport-google-oauth": "^2.0.0" in package.json
  • remove package-lock.json and node_modules folder (to ensure everything is clear)
  • run this command : npm install
  • It works now!

Note: my previous code still using profile._json.image.url to get profile image. Actually, this response was not there anymore. So I delete this code. Goodbye Google+ Thank you Google People API.