Friday, 15 June 2012

How to use Google APIs Client Library for .NET to get a new Refresh Token after it has expired? -



How to use Google APIs Client Library for .NET to get a new Refresh Token after it has expired? -

i'm trying find solution getting new refresh token after existing 1 has expired. google apis client library .net developer's guide provides hint:

both usercredential , serviceaccountcredential implement iconfigurablehttpclientinitializer can register each of these as:

an unsuccessful response handler, refresh token if receives http 401 status code. an interceptor, intercept authorization header on every request.

did figure out how register usercredential unsuccessful response handler , create handle 401s automatically?

by setting httpclientinitializer on baseserviceinitializer library magic (https://code.google.com/p/google-api-dotnet-client/source/browse/drive.sample/program.cs?repo=samples#106) - refreshes token when expires.

google-oauth google-api-dotnet-client

No comments:

Post a Comment