Re: 403 Forbidden error message when accessing Adwords API
Mick, It sounds like you have determined that the ErrorCode field value is BadAuthentication. According to the ClientLogin documentationhttps://developers.google.com/accounts/docs/AuthForInstalledApps#Errors, BadAuthentication indicates that the username and password is not recognized. Please verify the username/password. On the other note, ClientLogin usage is deprecated and will sunset in June 2014http://googleadsdeveloper.blogspot.com/2013/09/announcing-sunset-of-clientlogin-in.html. Please use OAuth 2.0 with the AdWords APIhttps://developers.google.com/adwords/api/docs/guides/authenticationinstead. Cheers, -- Ray Tsang (AdWords API Advisor) On Wednesday, January 8, 2014 8:58:26 AM UTC-5, mick@bbconsult.co.uk wrote: Hello, I’m wondering if you can help. We have access to the Google Adwords Developer API access token approved, and downloaded a sample .NET console application code from Adwords API web page in Feb 2013 – which worked fine then. When we tried to test it again now, we discovered '403 forbidden' error message (see copy of error details below for full error details). Our current code does not go as far as attempting to retrieve campaigns, for the moment it is just trying to pass authentication with OAuth using the developer token - which it is failing at. The below is the error log information from the latest version: This code example lists all campaigns. To add a campaign, run AddCampaign.cs. An exception occurred while running this code example. System.Reflection.TargetInvocationException (Exception has been thrown by the target of an invocation.) at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Google.Api.Ads.AdWords.Examples.CSharp.Program.InvokeRun(Object codeExample, AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\Program.cs:line 178 at Google.Api.Ads.AdWords.Examples.CSharp.Program.RunACodeExample(AdWordsUser user, Object codeExample) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\Program.cs:line 130 Caused by System.ApplicationException (Failed to retrieve campaigns) at Google.Api.Ads.AdWords.Examples.CSharp.v201302.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\v201302\BasicOperations\GetCampaigns.cs:line 100 Caused by Google.Api.Ads.Common.Lib.AuthTokenException (AuthToken login failed. See ErrorCode for more details.) at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 247 at Google.Api.Ads.Common.Lib.AuthToken.GetToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 192 at Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.InitForCall(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdWordsSoapClient.cs:line 66 at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdsSoapClient.cs:line 211 at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdsSoapClient.cs:line 127 at Google.Api.Ads.AdWords.v201302.CampaignService.get(Selector serviceSelector) in c:\src\MyProjects\now\Common library base\adwords\compile\v201302\AdWordsApi.cs:line 4949 at Google.Api.Ads.AdWords.Examples.CSharp.v201302.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\v201302\BasicOperations\GetCampaigns.cs:line 83 Caused by System.Net.WebException (The remote server returned an error: (403) Forbidden.) at System.Net.HttpWebRequest.GetResponse() at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 232 We implemented catching AuthTokenException in the stack trace. Its ErrorCode field value is *BadAuthentication* Any suggestions/help is much appreciated. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.blogspot.com
403 Forbidden error message when accessing Adwords API
Hello, I’m wondering if you can help. We have access to the Google Adwords Developer API access token approved, and downloaded a sample .NET console application code from Adwords API web page in Feb 2013 – which worked fine then. When we tried to test it again now, we discovered '403 forbidden' error message (see copy of error details below for full error details). Our current code does not go as far as attempting to retrieve campaigns, for the moment it is just trying to pass authentication with OAuth using the developer token - which it is failing at. The below is the error log information from the latest version: This code example lists all campaigns. To add a campaign, run AddCampaign.cs. An exception occurred while running this code example. System.Reflection.TargetInvocationException (Exception has been thrown by the target of an invocation.) at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Google.Api.Ads.AdWords.Examples.CSharp.Program.InvokeRun(Object codeExample, AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\Program.cs:line 178 at Google.Api.Ads.AdWords.Examples.CSharp.Program.RunACodeExample(AdWordsUser user, Object codeExample) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\Program.cs:line 130 Caused by System.ApplicationException (Failed to retrieve campaigns) at Google.Api.Ads.AdWords.Examples.CSharp.v201302.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\v201302\BasicOperations\GetCampaigns.cs:line 100 Caused by Google.Api.Ads.Common.Lib.AuthTokenException (AuthToken login failed. See ErrorCode for more details.) at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 247 at Google.Api.Ads.Common.Lib.AuthToken.GetToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 192 at Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.InitForCall(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdWordsSoapClient.cs:line 66 at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdsSoapClient.cs:line 211 at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdsSoapClient.cs:line 127 at Google.Api.Ads.AdWords.v201302.CampaignService.get(Selector serviceSelector) in c:\src\MyProjects\now\Common library base\adwords\compile\v201302\AdWordsApi.cs:line 4949 at Google.Api.Ads.AdWords.Examples.CSharp.v201302.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\v201302\BasicOperations\GetCampaigns.cs:line 83 Caused by System.Net.WebException (The remote server returned an error: (403) Forbidden.) at System.Net.HttpWebRequest.GetResponse() at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 232 We implemented catching AuthTokenException in the stack trace. Its ErrorCode field value is *BadAuthentication* Any suggestions/help is much appreciated. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/groups/opt_out. config file - MASKED PASSWORDS.config Description: Binary data
Re: 403 Forbidden error message when accessing Adwords API
Hi d2! Did you managed to resolve this problem? If yes I would like you to share the solution! Thanks! -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/groups/opt_out.
Re: 403 Forbidden error message when accessing Adwords API
Hi, Can anyone help with this issue? As we still haven't managed to resolve. Many thanks, Dhruvesh On Friday, 12 July 2013 10:11:26 UTC+1, d2...@hotmail.com wrote: Hi Anash, Thank you for your suggestion. The developer has reported the following feedback: * I've followed to your recommendation and got error code: ErrorCode = BadAuthentication For your convenience I've also attached our .config file. * Do you think it is worthwhile setting up Fiddler logging for further details? Thank you in advance for your help. Many thanks, Dhruvesh -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/groups/opt_out.
Re: 403 Forbidden error message when accessing Adwords API
Hi Anash, Thank you for your suggestion. The developer has reported the following feedback: * I've followed to your recommendation and got error code: ErrorCode = BadAuthentication For your convenience I've also attached our .config file. * Do you think it is worthwhile setting up Fiddler logging for further details? Thank you in advance for your help. Many thanks, Dhruvesh -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/groups/opt_out. Google.AdWords.Examples.CSharp.exe.config Description: XML document
Re: 403 Forbidden error message when accessing Adwords API
Hi Anash, Thank you for your suggestion. The developer has reported the following feedback: * I've followed to your recommendation and got error code: ErrorCode = BadAuthentication For your convenience I've also attached our .config file. * Do you think it is worthwhile setting up Fiddler logging for further details? Thank you in advance for your help. Many thanks, Dhruvesh -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/groups/opt_out. Google.AdWords.Examples.CSharp.exe - MASKED PASSWORDS.config Description: XML document
Re: 403 Forbidden error message when accessing Adwords API
Hi Dhruvesh, There's an AuthTokenException being thrown in the stack trace, catch it and inspect the ErrorCode field to find out why you are getting the error. Post the details on this thread, and I can help you. Cheers, Anash P. Oommen, AdWords API Advisor. On Monday, July 8, 2013 9:18:39 PM UTC+5:30, d2...@hotmail.com wrote: Hi Rob, Thanks for getting back to us - we have exactly the same issue with running examples with the updated library referencing both v201209 v2013002. Our current code does not go as far as attempting to retrieve campaigns, for the moment it is just trying to pass authentication with OAuth using the developer token - which it is failing at. The below is the error log information from the latest version: This code example lists all campaigns. To add a campaign, run AddCampaign.cs. An exception occurred while running this code example. System.Reflection.TargetInvocationException (Exception has been thrown by the target of an invocation.) at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Google.Api.Ads.AdWords.Examples.CSharp.Program.InvokeRun(Object codeExample, AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\Program.cs:line 178 at Google.Api.Ads.AdWords.Examples.CSharp.Program.RunACodeExample(AdWordsUser user, Object codeExample) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\Program.cs:line 130 Caused by System.ApplicationException (Failed to retrieve campaigns) at Google.Api.Ads.AdWords.Examples.CSharp.v201302.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\v201302\BasicOperations\GetCampaigns.cs:line 100 Caused by Google.Api.Ads.Common.Lib.AuthTokenException (AuthToken login failed. See ErrorCode for more details.) at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 247 at Google.Api.Ads.Common.Lib.AuthToken.GetToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 192 at Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.InitForCall(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdWordsSoapClient.cs:line 66 at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdsSoapClient.cs:line 211 at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdsSoapClient.cs:line 127 at Google.Api.Ads.AdWords.v201302.CampaignService.get(Selector serviceSelector) in c:\src\MyProjects\now\Common library base\adwords\compile\v201302\AdWordsApi.cs:line 4949 at Google.Api.Ads.AdWords.Examples.CSharp.v201302.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\v201302\BasicOperations\GetCampaigns.cs:line 83 Caused by System.Net.WebException (The remote server returned an error: (403) Forbidden.) at System.Net.HttpWebRequest.GetResponse() at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 232 Any suggestions/help is much appreciated. Thanks, Dhruvesh -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/groups/opt_out.
403 Forbidden error message when accessing Adwords API
Hello, I’m wondering if you can help. We have access to the Google Adwords Developer API access token approved, and downloaded a sample .NET console application code from Adwords API web page in Feb 2013 – which worked fine then. When we tried to test it again now, we discovered '403 forbidden' error message (see copy of error details below for full error details). An exception occurred while running this code example. System.Reflection.TargetInvocationException (Exception has been thrown by the target of an invocation.) at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Google.Api.Ads.AdWords.Examples.CSharp.Program.InvokeRun(Object codeExample, AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\sample projects\examples\adwords\csharp\Program.cs:line 140 at Google.Api.Ads.AdWords.Examples.CSharp.Program.RunACodeExample(AdWordsUser user, Object codeExample) in C:\Dev\QuickWins\Google Adwords\sample projects\examples\adwords\csharp\Program.cs:line 99 Caused by System.ApplicationException (Failed to retrieve campaigns) at Google.Api.Ads.AdWords.Examples.CSharp.v201206.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\sample projects\examples\adwords\csharp\v201206\BasicOperations\GetCampaigns.cs:line 100 Caused by Google.Api.Ads.Common.Lib.AuthTokenException (AuthToken login failed. See ErrorCode for more details.) at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in C:\Dev\QuickWins\Google Adwords\sample projects\src\Common\Lib\AuthToken.cs:line 247 at Google.Api.Ads.Common.Lib.AuthToken.GetToken() in C:\Dev\QuickWins\Google Adwords\sample projects\src\Common\Lib\AuthToken.cs:line 192 at Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.InitForCall(String methodName, Object[] parameters) in C:\Dev\QuickWins\Google Adwords\sample projects\src\AdWords\Lib\AdWordsSoapClient.cs:line 78 at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Object[] parameters) in C:\Dev\QuickWins\Google Adwords\sample projects\src\Common\Lib\AdsSoapClient.cs:line 210 at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, Object[] parameters) in C:\Dev\QuickWins\Google Adwords\sample projects\src\Common\Lib\AdsSoapClient.cs:line 127 at Google.Api.Ads.AdWords.v201206.CampaignService.get(Selector serviceSelector) in C:\Dev\QuickWins\Google Adwords\sample projects\src\AdWords\v201206\AdWordsApi.cs:line 3167 at Google.Api.Ads.AdWords.Examples.CSharp.v201206.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\sample projects\examples\adwords\csharp\v201206\BasicOperations\GetCampaigns.cs:line 83 Caused by System.Net.WebException (The remote server returned an error: (403) Forbidden.) at System.Net.HttpWebRequest.GetResponse() at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in C:\Dev\QuickWins\Google Adwords\sample projects\src\Common\Lib\AuthToken.cs:line 232 Does anyone have any suggestions to why this error appears? Has something changed with the API/DeveloperToken access since Feb 2013 (maybe something related to OAuth 2.0)? May be something is wrong in our config file? Your help is much appreciated – thank you. Please feel free to ask if you need any clarifications. Many thanks, Dhruvesh -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/groups/opt_out.
Re: 403 Forbidden error message when accessing Adwords API
It looks like you're using v201206, which is deprecated. (From what I can see here - you probably just need to upgrade your library to current [v201302]) On Monday, July 8, 2013 5:21:25 AM UTC-5, d2...@hotmail.com wrote: Hello, I’m wondering if you can help. We have access to the Google Adwords Developer API access token approved, and downloaded a sample .NET console application code from Adwords API web page in Feb 2013 – which worked fine then. When we tried to test it again now, we discovered '403 forbidden' error message (see copy of error details below for full error details). An exception occurred while running this code example. System.Reflection.TargetInvocationException (Exception has been thrown by the target of an invocation.) at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Google.Api.Ads.AdWords.Examples.CSharp.Program.InvokeRun(Object codeExample, AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\sample projects\examples\adwords\csharp\Program.cs:line 140 at Google.Api.Ads.AdWords.Examples.CSharp.Program.RunACodeExample(AdWordsUser user, Object codeExample) in C:\Dev\QuickWins\Google Adwords\sample projects\examples\adwords\csharp\Program.cs:line 99 Caused by System.ApplicationException (Failed to retrieve campaigns) at Google.Api.Ads.AdWords.Examples.CSharp.v201206.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\sample projects\examples\adwords\csharp\v201206\BasicOperations\GetCampaigns.cs:line 100 Caused by Google.Api.Ads.Common.Lib.AuthTokenException (AuthToken login failed. See ErrorCode for more details.) at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in C:\Dev\QuickWins\Google Adwords\sample projects\src\Common\Lib\AuthToken.cs:line 247 at Google.Api.Ads.Common.Lib.AuthToken.GetToken() in C:\Dev\QuickWins\Google Adwords\sample projects\src\Common\Lib\AuthToken.cs:line 192 at Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.InitForCall(String methodName, Object[] parameters) in C:\Dev\QuickWins\Google Adwords\sample projects\src\AdWords\Lib\AdWordsSoapClient.cs:line 78 at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Object[] parameters) in C:\Dev\QuickWins\Google Adwords\sample projects\src\Common\Lib\AdsSoapClient.cs:line 210 at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, Object[] parameters) in C:\Dev\QuickWins\Google Adwords\sample projects\src\Common\Lib\AdsSoapClient.cs:line 127 at Google.Api.Ads.AdWords.v201206.CampaignService.get(Selector serviceSelector) in C:\Dev\QuickWins\Google Adwords\sample projects\src\AdWords\v201206\AdWordsApi.cs:line 3167 at Google.Api.Ads.AdWords.Examples.CSharp.v201206.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\sample projects\examples\adwords\csharp\v201206\BasicOperations\GetCampaigns.cs:line 83 Caused by System.Net.WebException (The remote server returned an error: (403) Forbidden.) at System.Net.HttpWebRequest.GetResponse() at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in C:\Dev\QuickWins\Google Adwords\sample projects\src\Common\Lib\AuthToken.cs:line 232 Does anyone have any suggestions to why this error appears? Has something changed with the API/DeveloperToken access since Feb 2013 (maybe something related to OAuth 2.0)? May be something is wrong in our config file? Your help is much appreciated – thank you. Please feel free to ask if you need any clarifications. Many thanks, Dhruvesh -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/groups/opt_out.
Re: 403 Forbidden error message when accessing Adwords API
Hi Rob, Thanks for getting back to us - we have exactly the same issue with running examples with the updated library referencing both v201209 v2013002. Our current code does not go as far as attempting to retrieve campaigns, for the moment it is just trying to pass authentication with OAuth using the developer token - which it is failing at. The below is the error log information from the latest version: This code example lists all campaigns. To add a campaign, run AddCampaign.cs. An exception occurred while running this code example. System.Reflection.TargetInvocationException (Exception has been thrown by the target of an invocation.) at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Google.Api.Ads.AdWords.Examples.CSharp.Program.InvokeRun(Object codeExample, AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\Program.cs:line 178 at Google.Api.Ads.AdWords.Examples.CSharp.Program.RunACodeExample(AdWordsUser user, Object codeExample) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\Program.cs:line 130 Caused by System.ApplicationException (Failed to retrieve campaigns) at Google.Api.Ads.AdWords.Examples.CSharp.v201302.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\v201302\BasicOperations\GetCampaigns.cs:line 100 Caused by Google.Api.Ads.Common.Lib.AuthTokenException (AuthToken login failed. See ErrorCode for more details.) at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 247 at Google.Api.Ads.Common.Lib.AuthToken.GetToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 192 at Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.InitForCall(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdWordsSoapClient.cs:line 66 at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdsSoapClient.cs:line 211 at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AdsSoapClient.cs:line 127 at Google.Api.Ads.AdWords.v201302.CampaignService.get(Selector serviceSelector) in c:\src\MyProjects\now\Common library base\adwords\compile\v201302\AdWordsApi.cs:line 4949 at Google.Api.Ads.AdWords.Examples.CSharp.v201302.GetCampaigns.Run(AdWordsUser user) in C:\Dev\QuickWins\Google Adwords\awapi_dotnet_lib_v15.8.0\examples\CSharp\v201302\BasicOperations\GetCampaigns.cs:line 83 Caused by System.Net.WebException (The remote server returned an error: (403) Forbidden.) at System.Net.HttpWebRequest.GetResponse() at Google.Api.Ads.Common.Lib.AuthToken.GenerateToken() in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\AuthToken.cs:line 232 Any suggestions/help is much appreciated. Thanks, Dhruvesh -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/groups/opt_out.