Answer the question
In order to leave comments, you need to log in
Google OAuth: how to get access_token correctly?
Good afternoon!
This morning I ran into the problem of getting a token from Google.
At the moment, the situation is this: frontend goes to Google and gets code. It sends this code to the backend (a Java application with Embedded Jetty on board).
Having received this code, the backend makes a request to Google and, having received the token, stores it with itself and requests Google for account data. - Here is the plug.
According to the documentation, to get a token, you need to send a POST request with a code. In addition to the code in the request, there is a redirect_to parameter.
Two points are not clear to me here:
1) If you specify the same application in redirect_to, will the response from Google come as a response to a POST Request or in the form of a new connection?
2) Is it possible to omit this parameter?
3) The documentation says that the response will be in the form of JSON, will it come by POST or GET?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question