googleads / google-ads-dotnet

This project hosts the .NET client library for the Google Ads API.

Home Page:https://developers.google.com/google-ads/api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configuration is not loading Also for oAuth

RonnyCo opened this issue · comments

HI
I use the same authentication token in version 15.0.3 and all was worked perfectly when upgraded to version 16.1.0
And I got the following error
Exception V16.txt
when I reverted to 15.0.3 with same token it works.
I also have other issue with version 16.0.1 that the configuration is not loading when initializing the GoogleAdsClient
I think it may be related issues since looks like the oAuth token file is not loading as well

When calling GoogleAdsClient the "client.Config" return null inversion 16.1.0
Code sample:
var client = new GoogleAdsClient();
CustomerId = long.Parse(client.Config.LoginCustomerId);
googleAdsService = client.GetService(Services.V13.GoogleAdsService);

Ronny

Hi, looking at the exception log it seems like your application is not picking up the refresh token.

Where do you store it?

Be aware that in V16.0.0 we released a change in the way credentials are retrieved from App.config, settings.json and environment variable, so now you should add a dependency on Google.Ads.GoogleAds.Extensions to have that behavior and it's no longer supported by default.

For further information about the current behavior of the client library, take a look at the configuration documentation page.

Thanks works

Thanks work using the doc to fix the config load
https://developers.google.com/google-ads/api/docs/client-libs/dotnet/configuration
Ronny