Unable to get the account Labels using account label service

108 views
Skip to first unread message

rc1...@gmail.com

unread,
Dec 3, 2015, 3:15:34 PM12/3/15
to AdWords API Forum
Hi Team,

I am not able to get the Labels associated with the account.

I am using Account Label Service to get the account labels.

The Request ID is mentioned below. Please let me know if you need anything else.

<requestId>00052603c66655900ac246870d033586</requestId>

Thanks,

Kamran

Nadine Sundquist (AdWords API Team)

unread,
Dec 3, 2015, 6:06:15 PM12/3/15
to AdWords API Forum
Hi Kamran,

Thanks for providing the requestId. That really made everything a lot easier to track down. So, it looks like you're calling AccountLabelService against a customer account, rather than a manager account. Try using the LabelService instead at that level of your account hierarchy. If you call AccountLabelService one level above that account, which would be the manager account level, then you would get back account level labels.

Happy coding,
Nadine, AdWords API Team

rc1...@gmail.com

unread,
Dec 4, 2015, 7:39:28 AM12/4/15
to AdWords API Forum, kam...@bluecherrygroup.com
Hi Nadine,

Thank you for the quick update now I understand how to get the labels on account level.
Please see below for the request ID i used to get the labels.
<requestId>00052611ba919d700ac246870d033586</requestId>

But sorry I think I was not very clear earlier, actually I want to get Labels associated with particular account, e.g. i have many accounts in and i want to know through API, which labels are associated with each account.

Can you please let me know which API request should I be using to get this data?

Regards,

Kamran

Nadine Sundquist (AdWords API Team)

unread,
Dec 4, 2015, 11:00:30 AM12/4/15
to AdWords API Forum, kam...@bluecherrygroup.com
Hi Kamran,

Thanks for clarifying! The service you'll want to use is ManagedCustomerService->get() at the manager account level of your hierarchy. In your Selector, you'll want to choose:
  • CustomerId
  • AccountLabels
That will give you a mapping of each account with its associated account labels.

Best,
Nadine, AdWords API Team

rc1...@gmail.com

unread,
Dec 4, 2015, 2:50:45 PM12/4/15
to AdWords API Forum, kam...@bluecherrygroup.com
Hi Nadine,

Thanks for quick reply.

ManagedCustomerService->get() worked perfectly as per my requirement.

Thank you so much for the help!

Regards,

Kamran

On Friday, December 4, 2015 at 7:39:28 AM UTC-5, rc1...@gmail.com wrote:

silent_coder

unread,
Jun 21, 2017, 10:43:23 AM6/21/17
to AdWords API Forum, kam...@bluecherrygroup.com
Hi nadine,

When I use AccountLabels in Selector, it gives me:

InternalApiError.UNEXPECTED_INTERNAL_API_ERROR

What could be the problem here? Thanks

Nadine Sundquist (AdWords API Team)

unread,
Jun 21, 2017, 12:10:57 PM6/21/17
to AdWords API Forum, kam...@bluecherrygroup.com
Greetings!

Could you please start a new thread? This looks like a new issue, so it would be so helpful for you to do that. In that post, it would be great if you had the SOAP XML (with personal information not shown). To look up an error like this, we would need the requestId that is in the response that comes back.

Thanks,
Nadine, AdWords API Team
Reply all
Reply to author
Forward
0 new messages