all account list

108 views
Skip to first unread message

Oleg Disrupt

unread,
Nov 15, 2021, 2:16:06 PM11/15/21
to AdWords API and Google Ads API Forum
Hi
I want to get all account list in accounts->performance using php, google ads api.
Thanks

Google Ads API Forum Advisor

unread,
Nov 16, 2021, 1:19:29 AM11/16/21
to ol...@disrupt.social, adwor...@googlegroups.com
Hi Oleg,

Thank you for reaching out.

You can utilize the get account hierarchy feature to retrieve all your accounts under a specific MCC / manager account. Then, for reach client account returned, you may then generate the performance report you wish to to extract.

An example can be found in the Parallel Report Download documentation. However, this is currently not available for PHP. For the possibility of a similar implementation or workaround, I would recommend that you reach out to the PHP client library owners, via this link, for further guidance.

Best regards,

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 
Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2R9EPZ:ref

Oleg Disrupt

unread,
Dec 2, 2021, 2:01:54 AM12/2/21
to AdWords API and Google Ads API Forum
Hi,
Thank you for your help.
I tried to run GetAccountHierarchy.php but I can see this error.

-php examples/AccountManagement/GetAccountHierarchy.php

No manager customer ID is specified. The example will print the hierarchies of all accessible customer IDs:
9xxxxx
7xxxxxx
....

ApiException was thrown with message '{
    "message": "The caller does not have permission",
    "code": 7,
    "status": "PERMISSION_DENIED",
    "details": [
        {
            "@type": 0,
            "data": "type.googleapis.com\/google.ads.googleads.v9.errors.GoogleAdsFailure"
        },
        {
            "@type": 0,
            "data": [
                {
                    "errorCode": {
                        "authorizationError": "CUSTOMER_NOT_ENABLED"
                    },
                    "message": "The customer can't be used because it isn't enabled."
                }
            ]
        },
        {
            "@type": 0,
            "data": "B127576K16hj0cC6FRK2lw"
        }
    ]
}'.

can you help me?

Google Ads API Forum Advisor

unread,
Dec 2, 2021, 4:40:59 PM12/2/21
to ol...@disrupt.social, adwor...@googlegroups.com
Hi Oleg,

Can you please privately respond to us with the complete request and response logs so we can see the full context of the error? 

Thanks,
Matt
Google Ads API Team



Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 
Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2R9EPZ:ref
Reply all
Reply to author
Forward
0 new messages