We have an internal c# Adwords application which I trying to upgrade from client login(v201309) to OAuth2(v201402)
The application is running by scheduled job to update our Adwords data as well as pulling reports so there is no user interaction involved.
I have followed below example and was able to get as far as initialize the ServiceAccountCredential, In the example it's using PlusService but I was not able to find any example on Adwords API with ServiceAccountCredential,
X509Certificate2 certificate = new X509Certificate2(SERVICE_ACCOUNT_PKCS12_FILE_PATH, "notasecret", X509KeyStorageFlags.Exportable);
ServiceAccountCredential credential = new ServiceAccountCredential(
new ServiceAccountCredential.Initializer(SERVICE_ACCOUNT_EMAIL)
{
}.FromCertificate(certificate));
// Create the service ==> where I am stuck
//var service = new PlusService(new BaseClientService.Initializer()
//{
// HttpClientInitializer = credential,
// ApplicationName = "Plus API Sample",
//});
//Activity activity = service.Activities.Get(ACTIVITY_ID).Execute();
//Console.WriteLine(" Activity: " + activity.Object.Content);
//Console.WriteLine(" Video: " + activity.Object.Attachments[0].Url);
//Console.WriteLine("Press any key to continue...");
//Console.ReadKey();