Hello Dian, Could you please confirm whether you followed OAuth2 authentication guide <https://developers.google.com/adwords/api/docs/guides/first-api-call#set_up_oauth2_authentication> to setup OAuth credentials? the refresh token must be created using the credentials of the same account that is used to generate OAuth credentials at the same time the account must have access to the account you are making API calls to get campaigns. If the problem still persists, could you please share the complete error logs along with the .net client library version <https://github.com/googleads/googleads-dotnet-lib/releases> you are using to investigate further on this issue?
Regards, Sai Teja, AdWords API Team. On Monday, August 6, 2018 at 6:25:56 AM UTC-4, advisor managers wrote: > > hi peter > > well i try to get my refresh key but i have a problem with that . > i use a visual studio and i need that api for my website i cant execute > the ConsoleExample.cs > to get my refresh key > what should i do? > > that the problem that i get : > > Google.Api.Ads.Common.Lib.AdsOAuthException > HResult=0x80131500 > Message=Failed to refresh access token. See inner exception for details. > Source=<Cannot evaluate the exception source> > StackTrace: > <Cannot evaluate the exception stack trace> > > Inner Exception 1: > AggregateException: One or more errors occurred. > > Inner Exception 2: > TypeInitializationException: The type initializer for > 'Google.Apis.Json.NewtonsoftJsonSerializer' threw an exception. > > Inner Exception 3: > FileLoadException: Could not load file or assembly 'Newtonsoft.Json, > Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one > of its dependencies. The located assembly's manifest definition does not > match the assembly reference. (Exception from HRESULT: 0x80131040) > > > > thanks dian > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] 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 and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/ecf3c6b1-e777-4781-8498-77a96649d0e2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
