The execution of the code below never returns from the Execute function. I have my own calendar on my personal gmail account, which I shared with the developer.gserviceaccount.com account.
Looking at the API manager, the use / quotes show that I used or even hit the api yet.
Any thoughts appreciated.
using System.Security.Cryptography.X509Certificates; using System.Web; using Google.Apis.Calendar.v3; using Google.Apis.Auth.OAuth2; using Google.Apis.Services; public class GoogleLoginWithServiceAccount { public string getEventList() { var GoogleOAuth2CertificatePath = HttpContext.Current.Server.MapPath("~/xx/xx.p12"); var GoogleOAuth2EmailAddress = " xx-xxxx@developer.gserviceaccount.com "; var GoogleOAuth2PrivateKey = "notasecret"; var certificate = new X509Certificate2(GoogleOAuth2CertificatePath, GoogleOAuth2PrivateKey, X509KeyStorageFlags.Exportable); var credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer(GoogleOAuth2EmailAddress) {
I am still facing this problem. I created a simple application to reproduce this, does anyone have any thoughts? dropbox.com/s/g45xcta7ii3hj51/GoogleTestWeb.zip?dl=0
c # google-calendar google-api google-api-dotnet-client
Anthony
source share