C# Desktop application using Google Calendar API .NET v3 -- Howto? -


probably not 1 asking this, found nothing works...it's jungle ;)

i have c# desktop app (5-10 user) want connect google calendar. want add, move, delete, update events in calendar. downloaded installed last .net api v.3.

from read, difficult part authenticate/connecting procedure. suppose need use oauth 2.0 authentication ? want user authenticate once, not each time want make action (add, move, delete, update).in sample have cut , paste token web page console...not user friendly. , how authenticate 1 times (or put token directly in code not authenticate ?) ?

now, can have working sample code in c# make ?

thanks helping !!

i used similar example here. did create simple web application using sample logic setup initial auth google requires. stepped through , got refresh token state. saved in app setting use later during future getauthorization requests. @ least doing worked well, user never needed authorize long app stayed connected.

private iauthorizationstate getauthorization(webserverclient client)     {         iauthorizationstate state = new authorizationstate(new[] { calendarservice.scopes.calendar.getstringvalue() });         string refreshtoken = loadrefreshtoken();//this wrote code load app settings         if (!string.isnullorempty(refreshtoken))         {             state.refreshtoken = refreshtoken;             try             {                 if (client.refreshtoken(state))                     return state;             }             catch (protocolexception)             {                 return null;             }         }          return null;     } 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -