Hi,
Thank you for your response, but as you can see I'm already using these
examples (for C#/.net).
My code:
var user = new AdWordsUser();
(user.Config as AdWordsAppConfig).ClientCustomerId =
"4919245199"; // CID which has 130 ad groups displayed in web ui
(user.Config as AdWordsAppConfig).DeveloperToken = ...;
(user.Config as AdWordsAppConfig).OAuth2ClientId = ...;
(user.Config as AdWordsAppConfig).OAuth2ClientSecret = ...;
(user.Config as AdWordsAppConfig).OAuth2RefreshToken = ...;
using (var service = (AdGroupService)user.GetService(
AdWordsService.v201809.AdGroupService))
{
var selector = new Selector()
{
fields = new string[] {AdGroup.Fields.Id, AdGroup.Fields
.Name, AdGroup.Fields.CampaignId, AdGroup.Fields.AdGroupType},
};
var entries = service.get(selector);
return entries.entries;
}
it returns:
entries {Google.Api.Ads.AdWords.v201809.AdGroupPage} Google.Api.Ads.AdWords
.v201809.AdGroupPage
PageType "AdGroupPage" string
entries null Google.Api.Ads.AdWords.v201809.AdGroup[]
totalNumEntries 0 int
totalNumEntriesSpecified true bool
Non-Public members
I've enabled logs and here are results:
AdsClientLibs.SummaryRequestLogs Information: 1 : Request made: Host:
adwords.google.com, Service: AdGroupService, Method: get, clientCustomerId:
, Request ID: 00059583c806cfef0a012559360cbafd, ResponseTime(ms): 385,
OperationsCount: 1, IsFault: False, FaultMessage:
AdsClientLibs.DetailedRequestLogs Verbose: 1 :
-----------------BEGIN API CALL---------------------
Request
-------
POST /api/adwords/cm/v201809/AdGroupService
Authorization: REDACTED
Accept-Encoding: gzip, deflate
TimeStamp: Tue, 22 Oct 2019 11:15:13 GMT
<?xml version="1.0" encoding="utf-16"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809"
>
<clientCustomerId>4919245199</clientCustomerId>
<developerToken>REDACTED</developerToken>
<userAgent>unknown (AwApi-DotNet/24.8.0, Common-Dotnet/9.5.0, .NET CLR
/4.0.30319.42000, , gzip)</userAgent>
</RequestHeader>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=
"http://www.w3.org/2001/XMLSchema">
<get xmlns="https://adwords.google.com/api/adwords/cm/v201809">
<serviceSelector>
<fields>Id</fields>
<fields>Name</fields>
<fields>CampaignId</fields>
<fields>AdGroupType</fields>
</serviceSelector>
</get>
</s:Body>
</s:Envelope>
Response
--------
Date: Tue, 22 Oct 2019 18:15:13 GMT
Cache-Control: max-age=0, private
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q048=":443"; ma=2592000,h3-
Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8
Expires: Tue, 22 Oct 2019 18:15:13 GMT
TimeStamp: Tue, 22 Oct 2019 11:15:13 GMT
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ResponseHeader xmlns=
"https://adwords.google.com/api/adwords/cm/v201809">
<requestId>00059583c806cfef0a012559360cbafd</requestId>
<serviceName>AdGroupService</serviceName>
<methodName>get</methodName>
<operations>1</operations>
<responseTime>385</responseTime>
</ResponseHeader>
</soap:Header>
<soap:Body>
<getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201809">
<rval>
<totalNumEntries>0</totalNumEntries>
<Page.Type>AdGroupPage</Page.Type>
</rval>
</getResponse>
</soap:Body>
</soap:Envelope>
-----------------END API CALL-----------------------
Best
On Monday, October 21, 2019 at 9:32:38 AM UTC-7, adsapiforumadvisor wrote:
>
> Hi Tatiana,
>
> Thank you for reaching out. You can follow this example
> <https://developers.google.com/adwords/api/docs/samples/java/basic-operations#get-the-ad-groups-of-a-campaign>
> for
> getting the ad groups from your account (just remove the campaign ID
> filter). If that doesn't work, please provide the client customer ID of the
> account you're making the call on and the complete SOAP logs for your
> request so that we can investigate further. See here
> <https://github.com/googleads/googleads-java-lib#how-do-i-enable-logging>for
> more details on how to enable logging.
>
> Regards,
> Anthony
> Google Ads API Team
>
>
> ref:_00D1U1174p._5001UKNyin:ref
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"AdWords API and Google Ads 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/cb168a52-b6fc-4330-81ab-b85193c16db6%40googlegroups.com.