caller permission

2024-05-06 Thread ofir sabag
hey I'm trying to access the google ads api and manage data from manager 
account to his client accouts 
I'm using this code
public List GetCampaigns(string accountId)
{
string query = @"SELECT
campaign.id,
campaign.name,
campaign.network_settings.target_content_network
FROM campaign
ORDER BY campaign.id";
try 
{
this.ServiceClient.SearchStream(accountId.ToString(), query, delegate 
(SearchGoogleAdsStreamResponse resp)
{
foreach (GoogleAdsRow googleAdsRow in resp.Results)
{
Console.WriteLine("Campaign with ID {0} and name '{1}' was found.",
googleAdsRow.Campaign.Id, googleAdsRow.Campaign.Name);
}
});

}
catch (GoogleAdsException e)
{
Console.WriteLine("Failure:");
Console.WriteLine($"Message: {e.Message}");
Console.WriteLine($"Failure: {e.Failure}");
Console.WriteLine($"Request ID: {e.RequestId}");
throw;
}
throw new NotImplementedException();
}

 with this configuration template
DeveloperToken = @"***",
OAuth2Mode = Google.Ads.Gax.Config.OAuth2Flow.APPLICATION,
OAuth2ClientId = "***.apps.googleusercontent.com",
OAuth2ClientSecret = "***",
OAuth2RefreshToken = "***",
LoginCustomerId = "***"

I do have valid client id client secret developer token and a refresh token 
the developer token access level is testing
the client accounts I'm trying to access are also testing level
but when I run the code I get an error message saying "the caller does not 
have permission"
what can I do to fix this?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/30e1de5d-68f1-4edf-b6e7-5178f3ebfe94n%40googlegroups.com.


Caller permission

2024-04-24 Thread ofir sabag
I am trying to make a call to the ads api using the code piece
this.ServiceClient.SearchStream(search.CustomerId, search.Query, delegate 
(SearchGoogleAdsStreamResponse resp)
{
foreach (GoogleAdsRow googleAdsRow in resp.Results)
{
Console.WriteLine("Campaign with ID {0} and name '{1}' was found.",
googleAdsRow.Campaign.Id, googleAdsRow.Campaign.Name);
}
});

and I get an error message "the caller does not have permission" on it
I have a developer token with test access level 
I also have a valid client id client secret and a refresh token 
What is a possible solution for this error?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/acc2f601-8604-44d0-9320-94fc22d24a58n%40googlegroups.com.


generating refresh token

2024-04-12 Thread ofir sabag

I'm attempting to connect to the Google Ads API using a C# library, but I'm 
struggling to understand how to generate an OAuth2 refresh token. I've read 
the documentation, which suggests using oauth2l, but I haven't been able to 
install it on my computer. Is there an alternative method to generate the 
refresh token?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/47cc4280-aaa5-4902-b30c-71c5d2a9d499n%40googlegroups.com.