Get the campaign ID when create a new campaign

24 views
Skip to first unread message

Giovanni Cortes

unread,
Jun 15, 2015, 1:03:23 PM6/15/15
to adwor...@googlegroups.com
I want to obtain the campaign ID when is created.

I have this code

client.SetClientCustomerId(client_customer_id)
campaign_service = client.GetService('CampaignService')

budget_id = add_budget(client, client_customer_id, budget)

operations = [{
'operator': 'ADD',
'operand': {
'name': campaign_name,
'status': 'PAUSED',
'biddingStrategyConfiguration': {
'biddingStrategyType': 'MANUAL_CPC',
'biddingScheme': {
'xsi_type': 'ManualCpcBiddingScheme',
'enhancedCpcEnabled': 'false',
}
},
'budget': {
'budgetId': budget_id
},
'advertisingChannelType': add_channel_type,
}
}]

return campaign_service.mutate(operations)


but when I print the campaign service I get None 

Michael Cloonan (AdWords API Team)

unread,
Jun 15, 2015, 1:53:33 PM6/15/15
to adwor...@googlegroups.com, m...@giovannicortes.com
Hello,

The mutate result should include the campaign ID in it. Please include a SOAP request/response if you're not able to see it, to help troubleshoot.

Regards,
Mike, AdWords API Team
Reply all
Reply to author
Forward
0 new messages