Re: Adwords OAuth2 using Service Account in C#
This is a completely worthless response. Please show some steps for how to set up a service account. On Monday, June 2, 2014 9:40:04 AM UTC-4, Josh Radcliff (AdWords API Team) wrote: Hi, Are you trying to use a Service Account? If so, the .NET library's OAuth2 Guide https://github.com/googleads/googleads-adwords-dotnet-lib/wiki/Using-OAuth#using-oauth20-service-accounts contains useful information. If you are using a Service Account, I highly recommend considering the *Installed Application* or *Web Application* flow instead. You can achieve very similar results https://developers.google.com/adwords/api/docs/guides/service-accounts with these flows and they are far easier to set up than the Service Account flow. Cheers, Josh, AdWords API Team On Sunday, June 1, 2014 7:00:40 AM UTC-4, Chris Sturgeon wrote: I am having the same issue. Were you able to figure this out? On Thursday, April 3, 2014 11:13:19 AM UTC-4, Richard wrote: Hi, 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, please advice how to obtain an Access Token from this point. https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#service_account X509Certificate2 certificate = new X509Certificate2(SERVICE_ACCOUNT_PKCS12_FILE_PATH, notasecret, X509KeyStorageFlags.Exportable); ServiceAccountCredential credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer(SERVICE_ACCOUNT_EMAIL) { Scopes = new[] { https://adwords.google.com/api/adwords/; } }.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(); -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/7bee27c3-4373-49bb-a1df-6dab6a38ed2a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Adwords OAuth2 using Service Account in C#
Hi, The documentation in my previous post shows: a. How to set up your App.config/Web.config for service accounts: https://github.com/googleads/googleads-adwords-dotnet-lib/wiki/Using-OAuth#using-oauth20-service-accounts b. Step by step instructions on using a service account with the AdWords API: https://developers.google.com/adwords/api/docs/guides/service-accounts Could you provide more details on what is not clear from those docs, or which step is giving you trouble? Thanks, Josh, AdWords API Team On Friday, August 22, 2014 6:20:53 PM UTC-4, Jon Jones wrote: This is a completely worthless response. Please show some steps for how to set up a service account. On Monday, June 2, 2014 9:40:04 AM UTC-4, Josh Radcliff (AdWords API Team) wrote: Hi, Are you trying to use a Service Account? If so, the .NET library's OAuth2 Guide https://github.com/googleads/googleads-adwords-dotnet-lib/wiki/Using-OAuth#using-oauth20-service-accounts contains useful information. If you are using a Service Account, I highly recommend considering the *Installed Application* or *Web Application* flow instead. You can achieve very similar results https://developers.google.com/adwords/api/docs/guides/service-accounts with these flows and they are far easier to set up than the Service Account flow. Cheers, Josh, AdWords API Team On Sunday, June 1, 2014 7:00:40 AM UTC-4, Chris Sturgeon wrote: I am having the same issue. Were you able to figure this out? On Thursday, April 3, 2014 11:13:19 AM UTC-4, Richard wrote: Hi, 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, please advice how to obtain an Access Token from this point. https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#service_account X509Certificate2 certificate = new X509Certificate2(SERVICE_ACCOUNT_PKCS12_FILE_PATH, notasecret, X509KeyStorageFlags.Exportable); ServiceAccountCredential credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer(SERVICE_ACCOUNT_EMAIL) { Scopes = new[] { https://adwords.google.com/api/adwords/; } }.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(); -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/722db42d-7f02-49d6-b1f8-3e6d3e01b4c4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Adwords OAuth2 using Service Account in C#
I am having the same issue. Were you able to figure this out? On Thursday, April 3, 2014 11:13:19 AM UTC-4, Richard wrote: Hi, 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, please advice how to obtain an Access Token from this point. https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#service_account X509Certificate2 certificate = new X509Certificate2(SERVICE_ACCOUNT_PKCS12_FILE_PATH, notasecret, X509KeyStorageFlags.Exportable); ServiceAccountCredential credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer(SERVICE_ACCOUNT_EMAIL) { Scopes = new[] { https://adwords.google.com/api/adwords/; } }.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(); -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Adwords OAuth2 using Service Account in C#
Hi, Are you trying to use a Service Account? If so, the .NET library's OAuth2 Guide https://github.com/googleads/googleads-adwords-dotnet-lib/wiki/Using-OAuth#using-oauth20-service-accounts contains useful information. If you are using a Service Account, I highly recommend considering the *Installed Application* or *Web Application* flow instead. You can achieve very similar results https://developers.google.com/adwords/api/docs/guides/service-accounts with these flows and they are far easier to set up than the Service Account flow. Cheers, Josh, AdWords API Team On Sunday, June 1, 2014 7:00:40 AM UTC-4, Chris Sturgeon wrote: I am having the same issue. Were you able to figure this out? On Thursday, April 3, 2014 11:13:19 AM UTC-4, Richard wrote: Hi, 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, please advice how to obtain an Access Token from this point. https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#service_account X509Certificate2 certificate = new X509Certificate2(SERVICE_ACCOUNT_PKCS12_FILE_PATH, notasecret, X509KeyStorageFlags.Exportable); ServiceAccountCredential credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer(SERVICE_ACCOUNT_EMAIL) { Scopes = new[] { https://adwords.google.com/api/adwords/; } }.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(); -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Adwords OAuth2 using Service Account in C#
Hi, 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, please advice how to obtain an Access Token from this point. https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#service_account X509Certificate2 certificate = new X509Certificate2(SERVICE_ACCOUNT_PKCS12_FILE_PATH, notasecret, X509KeyStorageFlags.Exportable); ServiceAccountCredential credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer(SERVICE_ACCOUNT_EMAIL) { Scopes = new[] { https://adwords.google.com/api/adwords/; } }.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(); -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Adwords OAuth2 using Service Account in C#
Hi, After the initial OAuth user interaction, you can still perform operations without further user interaction with the *Installed Application* and *Web Application* flows as long as you request offline accesshttps://developers.google.com/adwords/api/docs/guides/authentication#offline_access. Due to its complexity I recommend considering these other flows before trying to use the service account flow. Please take a look at the .NET OAuth wikihttps://github.com/googleads/googleads-adwords-dotnet-lib/wiki/How-to-create-OAuth2-client-id-and-secret and post back if you still have trouble with the setup. Cheers, Josh, AdWords API Team On Thursday, April 3, 2014 11:13:19 AM UTC-4, Richard wrote: Hi, 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, please advice how to obtain an Access Token from this point. https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#service_account X509Certificate2 certificate = new X509Certificate2(SERVICE_ACCOUNT_PKCS12_FILE_PATH, notasecret, X509KeyStorageFlags.Exportable); ServiceAccountCredential credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer(SERVICE_ACCOUNT_EMAIL) { Scopes = new[] { https://adwords.google.com/api/adwords/; } }.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(); -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.