All customers to dropdown (select)

17 views
Skip to first unread message

paul webb

unread,
Sep 22, 2016, 3:58:25 PM9/22/16
to AdWords API Forum
Hi Guys,
First of all this is my first ever time working with the AdWords API, so please bear with me.

We have already had our key approved and im working in PHP.

Im looking to be able to get all my existing customers under my MCC into a dropdown. for example

<select>
 
<option value='CUSTOMER ID'>CUSTOMER NAME</option>
</select>

Now I would of said it would need to be done on a foreach but i cant work out how to get the data from the api

Any help is much appreciated.

Thanks
Paul 

Anthony Madrigal

unread,
Sep 22, 2016, 4:40:21 PM9/22/16
to AdWords API Forum
Hi Paul,

Welcome to AdWords API. Glad you decided to start working with it. You can use the ManagedCustomerService to get back the info of your accounts under the MCC. You will just need to make sure have the clientCustomerId set to your MCC account Id in the auth.ini file. 

Our client libraries have examples of how to use the service. You can find it here.

Cheers,
Anthony
AdWords API Team

paul webb

unread,
Sep 22, 2016, 5:46:27 PM9/22/16
to AdWords API Forum
Hi Anthony

Thanks for the reply.

Noob question. Do I have to include the file in the file I'm working on?

Thanks again

Anthony Madrigal

unread,
Sep 22, 2016, 7:51:59 PM9/22/16
to AdWords API Forum
Hi Paul,

If you are using our client library, you will not need to worry about including the auth.ini file when running GetAccountHierarchy.php.

Regards,
Anthony
AdWords API Team
Reply all
Reply to author
Forward
0 new messages