I'm working through the instructions to use OAuth2 to get access to Gmail in an installed (Windows) application, on the page https://developers.google.com/identity/protocols/OAuth2InstalledApp. It all seems straightforward until I get to the part about "making a token request". One of the parameters to the POST I have to do is redirect_uri, which it says is "The redirect URI you obtained from the Developers Console."
I have obtained my ClientID and ClientSecret from the Developers Console, but can't see anywhere that I get a redirect_uri from it.
What am I missing? Thanks.
Authentication is baslicy a three or four step process
Step one is just getting the authentication code. this link can be placed in any browser window its a HTTP GET
Once the user has accepted access you will be given an authentication code.
That code is sent back to the server to get a refresh token and the first access token. this is a HTTP POST.
The response will be something like this
The access token will only work for one hour and it will expire after that you will need to use the refresh token to get a new access token.
This is also a HTTP Post
response
code has been ripped from my tutorial Google 3 legged oauth2 it has more explanation than this.