Google API is active but give error ; Legacy People API has not been used in project before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project= then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Carriage Return (ASCII chr 13) is missing from tex
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
In this case, I'm facing the same issue. This is what I've done to fix it.
Situation:
When I run the apps and click Sign in with Google, what happened then?
How I solve it?
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.
I was also having the same issue but with my Rails app. So I resolved it by upgrading the omniauth gems by running
bundle update devise omniauth omniauth-google-oauth2
in terminal.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
Hi I recently stumbeled on the same issue. As explained by Ilan Laloum, Google+ API as been decommissionned completely for new projects.
I found that Google People API works in a similar way. The following example is based on the Bookshelf tutorial in GCP. Source code can be seen here: https://github.com/GoogleCloudPlatform/golang-samples/tree/appengine/go111/cloudsql/getting-started/bookshelf (branch
appengine/go111/cloudsql
)This method needs a context and a OAuth token, just like Google+ API used to. The
peopleService
is initialized in a similar fashion.The
peopleService.People.Get("people/me")
prepares a query that fetches the profile of the connected user. ThenPersonFields("names,coverPhotos,emailAddresses")
is a filter on profile fields. This part of the request is mandatory. EventuallyDo()
will execute the request.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
This issue can be fixed using the
passport-google-token
npm install passport-google-token