Unable to get Adwords User Information

28 views
Skip to first unread message

pallavi...@netelixir.com

unread,
Nov 15, 2018, 6:22:23 AM11/15/18
to AdWords API and Google Ads API Forum
Hi,

I am using Google Adwords Api for Excel Addin using c#.Net in visual studio 2017. 
Unable to load adwords account due to an exception at Adwords User metadata file.


 AdWordsUser user = new AdWordsUser();
            (user.Config as AdWordsAppConfig).ClientCustomerId = Globals.ThisAddIn.LXRCustomerID;
            (user.Config as AdWordsAppConfig).DeveloperToken = Globals.ThisAddIn.AdWordsDeveloperToken;
            (user.Config as AdWordsAppConfig).OAuth2RefreshToken = Globals.ThisAddIn.refreshtoken;
            (user.Config as AdWordsAppConfig).OAuth2AccessToken = Globals.ThisAddIn.AdwordsAccessToken;
            (user.Config as AdWordsAppConfig).OAuth2ClientId = Globals.ThisAddIn.AdWordsClientId;
            (user.Config as AdWordsAppConfig).OAuth2ClientSecret = Globals.ThisAddIn.AdWordsClientSecretId;

Exception after following line.
 AdWordsUser user = new AdWordsUser();


Info at Adwords User Metadata File.
  public AdWordsUser();
        //
        // Summary:
        //     Public constructor. Use this version if you want to construct an AdWordsUser
        //     with a custom configuration.
        public AdWordsUser(AdWordsAppConfig config);
        //
        // Summary:
        //     Parameterized constructor. Use this version if you want to construct an AdWordsUser
        //     with a custom set of headers.
        //
        // Parameters:
        //   headers:
        //     The custom set of headers.

Exception has the following message.

Could not load file or assembly 'Google.Apis.Core, Version=1.33.1.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Google.Apis.Core, Version=1.33.1.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab.

I am attaching Fusion Log file for the error.

Please solve my issue.

Thanks in advance,
Pallavi


Fusion Log Info.txt

Teja Makani

unread,
Nov 15, 2018, 1:22:40 PM11/15/18
to AdWords API and Google Ads API Forum
Hello Pallavi,

Could you please confirm whether all the credentials are in place in your App.config file? Since you are using our C#/.NET client library the credentials will be picked up from the App.config file. If you are still facing the issues you could enable logging by following the instructions shown in this README.md file and share the complete SOAP logs(request and response) without redacting any information. You could use reply privately to the author option while sharing the details requested.

Regards,
Sai Teja, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages