I get 404 errors while following step by step the "Using OAuth 2.0 for Web Server Applications" help page. Using OAuth 2.0 for Web Server Applications
I use http/rest requests.
Everything is OK until step 5 : "Exchange authorization code for refresh and access tokens".
My request (POST or GET) returns a 404 error: "Not Found". Here is my request, the same as in the guide:
https://www.googleapis.com/oauth2/v4/token?
code=4/_XXXXXXXXXXXXXXXXXXX__XXXXXXXXXXXXXX-XXXXXX?&client_id=012345678912-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.apps.googleusercontent.com&client_secret=XXXXXXXXXXXXXXXXXXX_XXXX&grant_type=authorization_code&redirect_uri=http%3a%2f%2fwww.mydomain.com%3a50000%2fMyPage
Here is the related part of the guide:
"To exchange an authorization code for an access token, call the https://www.googleapis.com/oauth2/v4/token endpoint and set the following parameters:
Fields
code The authorization code returned from the initial request.
client_id The client ID obtained from the API Console.
client_secret The client secret obtained from the API Console.
redirect_uri One of the redirect URIs listed for your project in the API Console.
grant_type As defined in the OAuth 2.0 specification, this field must contain a value of authorization_code."
I think there is a problem with the service URL. Am I wrong?
Can any one provide the working URL?