Instead of using app.config I changed the code to include a config when I 
create the client.
    GoogleAdsConfig config = new GoogleAdsConfig()
    {
      OAuth2Mode = Google.Ads.Gax.Config.OAuth2Flow.APPLICATION,
      OAuth2ClientId = ClientId,
      OAuth2ClientSecret = ClientSecret,
      OAuth2RefreshToken = RefreshToken,
      LoginCustomerId = CustomerID,
      DeveloperToken = DeveloperToken
    };
    var client = new GoogleAdsClient(config);

That works, But...

Now I get a Permission Denied:
{"Status(StatusCode=\"PermissionDenied\", Detail=\"The caller does not have 
permission\")"}

I used my google ads manager account to generate the refresh token. 
The same manager I use to login to google ads and can see all our campaigns 
(and the Ads API center where I got the developer token). So I know that 
user have access.

Any idea why that user doesn't have permission?
It it another kind of permission I'm missing some where??

On Tuesday, June 27, 2023 at 2:39:28 PM UTC+2 Google Ads API Forum Advisor 
wrote:

> Hi,
>
> Thank you for raising your concern to the Google Ads API team.
>
> I understand you are encountering errors with your refresh token. With 
> that being said, kindly refer to this *document*:(
> https://developers.google.com/google-ads/api/docs/first-call/refresh-token#c) 
> or *here*:(
> https://developers.google.com/google-ads/api/docs/client-libs/dotnet/oauth-web)
>  
> for the steps as well as the setup of your app.config file. More 
> information about configuration for your client library can also be found 
> here: 
> https://developers.google.com/google-ads/api/docs/client-libs/dotnet/configuration
>
> If you still encounter the issue, kindly raise your concern to the author 
> of the client library you are using by creating a new issue - 
> https://github.com/googleads/google-ads-dotnet/issues
>
> Let me know if you have any questions.
>  
> This message is in relation to case "ref:_00D1U1174p._5004Q2mXaSe:ref"
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/3d83df08-1dc1-4061-95e4-02bb4b7b0170n%40googlegroups.com.

Reply via email to