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.
428 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
code snippet iam using :
authorization_data = AuthorizationData(
authentication=auth,
developer_token=DEVELOPER_TOKEN,
)
service = ServiceClient(
service='CustomerManagementService',
version=13,
authorization_data=authorization_data,
)
accounts = service.GetAccountsInfo()
account_ids = [account.Id for account in accounts.AccountInfo]
if not account_ids:
raise Exception("No account IDs found.")
print("account ids in ",account_ids)
bulk_service = BulkServiceManager(
authorization_data=authorization_data,
poll_interval_in_milliseconds=5000
)
entities = ['Campaigns', 'AdGroups', 'Ads']
download_parameters = DownloadParameters(
campaign_ids=None,
data_scope=['EntityData'],
download_entities=entities,
result_file_directory='.',
result_file_name=f'bulk_data_account_{account_ids[0]}.zip',
overwrite_result_file=True
)
print("Submitting bulk data download request...")
download_request_id = bulk_service.submit_download(download_parameters)
The error was like this:
Web service reported a SOAP processing fault using an unexpected HTTP status code 200 and reporting as an internal server error.
raise WebFault(fault, replyroot)
suds.WebFault: Server raised fault: 'Invalid client data. Check the SOAP fault details for more information. TrackingId: 243a8434-c180-4497-b298-15e982a4e1.'