Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading Reports from Manager Account #224

Open
cachatj opened this issue Oct 22, 2022 · 0 comments
Open

Downloading Reports from Manager Account #224

cachatj opened this issue Oct 22, 2022 · 0 comments

Comments

@cachatj
Copy link

cachatj commented Oct 22, 2022

I am trying to download a custom report made on ads.microsoft.com; which is made up of several clients (n=150) under control of a single Manager Account.

  1. If I want to use request_report.py as a starting point, where can I inject the custom report name or report_id in order to download a single csv file?

  2. looking at auth_helper.py (below), would I use my Manager account_id as the UserId? Also, if my first time running the script I logged into the wrong account, how re-log in to change the account_id its currently using (which is wrong) vs hardcoding the account_id (which is commented in) to one of the accounts under our management?

    # Set to an empty user identifier to get the current authenticated Bing Ads user,
    # and then search for all accounts the user can access.
    user=get_user_response=customer_service.GetUser(
        UserId=None
    ).User
    accounts=search_accounts_by_user_id(customer_service, user.Id)
    
    # For this example we'll use the first account.
    # authorization_data.account_id=accounts['AdvertiserAccount'][0].Id
    # authorization_data.customer_id=accounts['AdvertiserAccount'][0].ParentCustomerId
    authorization_data.account_id = '########'
    authorization_data.customer_id = accounts['AdvertiserAccount'][0].ParentCustomerId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant