How can I get CustomerID of programmatically (not through the web UI)?

Alex Contreras 6 Reputation points
2021-10-25T17:53:12.163+00:00

In order to perform operations such as GetKeywordsByAdGroupId I have to set the CustomerId field in the request header.

This can be found in the UI but we manage several customers and need to get this CustomerID programmatically, to then use it in other requests.

I tried the GetCustomersInfo Service Operation, but the returned ID is not the CustomerID. It's some other system ID (3 digits in this test case).

How can I find the CustomerID field programmatically? I believe this is called a Manager account Number in the UI.

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
383 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alex Contreras 6 Reputation points
    2021-10-25T18:53:22.767+00:00

    So the docs say this CustomerID field is necessary but it looks like it's not. I can make successful API calls without setting it. So I'll just do that.

    1 person found this answer helpful.