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<GoogleCampaign> 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 [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/30e1de5d-68f1-4edf-b6e7-5178f3ebfe94n%40googlegroups.com.