Closed rishaab closed 2 years ago
This should work. let us know otherwise.
adTypes=campaign_service.factory.create('ArrayOfAdType')
adTypes.AdType.append('Text')
adTypes.AdType.append('ResponsiveSearch')
response=campaign_service.GetAdsByAdGroupId(
AdGroupId=ad_group_ids['long'][0],
AdTypes=adTypes
)
This worked fine, thanks!
@qitia Couldn't the Python library be changed to allow us to pass just the list of types? The current solution seems to be overly complicated and it's not documented anywhere, except here.
My goal is to get a dataframe of ads and their meta information from the bingAds API.
I'm using the campaign management service to GetAdsByAdGroupId()
Following the documentation below: https://docs.microsoft.com/en-us/advertising/campaign-management-service/getadsbyadgroupid?view=bingads-13
I need to pass 2 arguments into GetAdsByAdGroupId() to build the request body elements
Element - Description - Data type
Below is the code I've written:
However I'm getting the following error:
I suspect that I'm not passing the adtypes correctly, could I get some help as to how I can pass the adtypes into the GetAdsByAdGroupId() function to build the request body.
Thanks!