I have checked answer how to get user info via Google API, but it does not help to resolve the issue because of API was changed and some links are incorrect.
Google uses oauth2
, so to load any user info via js we need follow next steps:
- invite user to authorize in
google service
to get his personal oauth token; - get users token from
google service
answer; - make request to load users info (request should be subscribed his personal token).
Am I correct with this steps?
In google guide they wrote to authorize user should be used next API https://accounts.google.com/o/oauth2/v2/auth. If I login myself I can see request sends to https://accounts.google.com/signin/challenge/sl/password
Can I have a curl
example how to get users oauth token (to use it in next requests to load users data)?