// Simple code snippet showing use of Google Service Account JSON key file within ServiceAccountCredential. using System.IO; using Google.Apis.Auth.OAuth2; using Google.Apis.Calendar.v3; using Google.Apis.Calendar.v3.Data; using Google.Apis.Services; using Newtonsoft.Json.Linq; var serviceAccountJson = File.ReadAllText(""); var o = JObject.Parse(serviceAccountJson); var email = o["client_email"].ToString(); var privateKey = o["private_key"].ToString(); ServiceAccountCredential credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer(email) { Scopes = new[] { CalendarService.Scope.CalendarReadonly } }.FromPrivateKey(privateKey); // Just an example initialising Calendar API var service = new CalendarService(new BaseClientService.Initializer { HttpClientInitializer = credential, ApplicationName = "APP-NAME-HERE" }); // Then do what you like with the 'service' instance.