Open GoogleCodeExporter opened 9 years ago
I'm still not sure what is missing to you right now (sorry).
Authenticate once (using the redirect page, authorize your app, and from that
point the app will automatically refresh the token).
All documentation is available in:
https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth
Sorry that I'm still not getting you - try to be more specific. Did you try to
convert your code and follow the new OAuth 2.0 flow?
Original comment by pele...@google.com
on 14 Nov 2014 at 5:29
I am trying for the server side communication. So no redirection I want to
perform(As it this is executed as part of the CRON scheduler job).
The refresh token has already been retrieved offline. The above code describes
how to do the communication there after. But the code snippet uses old Google
api library and is deprecated. I have downloaded the new version of the library
from the Nugget. But the code snippet does not below,
var provider = new WebServerClient(GoogleAuthenticationServer.Description);
// TO UPDATE, can be found in the APIs Console.
provider.ClientIdentifier = "335858260352.apps.googleusercontent.com";
// TO UPDATE, can be found in the APIs Console.
provider.ClientSecret = "yAMx-sR[truncated]fX9ghtPRI";
var auth = new OAuth2Authenticator<WebServerClient>(provider, GetAuthorization);
// Create the service.
var service = new CoordinateService(new BaseClientService.Initializer()
{
Authenticator = auth
});
does not have definition in the new library.
How can I achieve this with the new library.
Original comment by theanish...@gmail.com
on 17 Nov 2014 at 5:51
Take a look in our documentation in:
https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth and
especially in
https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#web_appl
ications.
We already have a sample for ASP.NET (not mvc) here:
https://code.google.com/p/google-api-dotnet-client/source/browse/?repo=samples#h
g%2FTasks.ASP.NET.SimpleOAuth2
We work hard on improving our documentation, so if something is missing, please
let me know.
I keep this thread open, feel free to close it :)
Original comment by pele...@google.com
on 19 Nov 2014 at 2:35
Original issue reported on code.google.com by
theanish...@gmail.com
on 12 Nov 2014 at 8:25