Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adwords api authentication with service account #192

Closed
vyurbonas opened this issue May 29, 2020 · 2 comments
Closed

Adwords api authentication with service account #192

vyurbonas opened this issue May 29, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@vyurbonas
Copy link

vyurbonas commented May 29, 2020

Actions taken
This is my App.config section :

<add key="OAuth2Mode" value="SERVICE_ACCOUNT" />
<add key="OAuth2PrnEmail" value="*****" />
<add key="OAuth2SecretsJsonPath" value="******.json" />
<add key="DeveloperToken" value="***********"/>
<add key = 'LoginCustomerId' value = '*********' />

Expected result
Authentication with service account without any interaction from the user

Actual result
Got error:"Missing required parameter: refresh_token", Uri:""

** Most likely cause of error (suggested by support via email) and workaround:
Looks like reading the OAuth2Mode from App.config in this method.
https://github.com/googleads/google-ads-dotnet/blob/master/src/Config/GoogleAdsConfig.cs#L487

As a workaround, if you set

var client = new GoogleAdsClient();
client.Config.OAuth2Mode = OAuth2Flow.SERVICE_ACCOUNT;

Should work.

@vyurbonas vyurbonas added the bug Something isn't working label May 29, 2020
@AnashOommen AnashOommen self-assigned this Jun 1, 2020
@AnashOommen
Copy link
Member

I thought this made it into v3.0.0, but a bad GitHub merge caused this fix to drop. I'll get this live for v3.1.0.

@AnashOommen
Copy link
Member

Fixed in v4.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants