Closed vp-at-st closed 1 year ago
Hello @qitia , please inform if you'll be able to assist on this matter.
logs show that you are not passing valid AccountId.
@qitia, The exact same AccountId works for GetCampaignsByIds() and GetAccount(). The documentation on all 3 methods mentions the same AccountId property. What's the difference then?
Ran the script one more time: I picked 1 AccountId and used it for 2 methods. Got a successful response from GetCampaignsByIds() Got a successful response from GetAccount()
Then I used THE SAME ACCOUNT ID for UpdateCampaigns()
Got an error with this TrackingId: cb139a92-cc7b-44b4-a481-e34e402ad6c7.
hi there, logs for your request is interesting. it shows "Parameter 'Campaigns' is required and hasn't been found". May I Know how you are calling this UpdateCampaigns API?
TrackingId: e1d7dd3b-0fba-4141-a742-b0fc0cb6b6a8.
` ACCOUNT_ID = 1111111 customer_id = 22222
auth_helper = AuthHelper() auth_data_2, cmp_service = auth_helper.get_service_client( service_type="CampaignManagementService", account_id=ACCOUNT_ID, customer_id=customer_id, )
campaigns = cmp_service.factory.create("ArrayOfCampaign") campaign = cmp_service.factory.create("Campaign")
campaign.FinalUrlSuffix = "utm_dc=test_testtest{test_id}" campaign.Id = 335442238
campaigns = campaigns.Campaign.append(campaign)
campaign_update_response = cmp_service.UpdateCampaigns(AccountId=ACCOUNT_ID, Campaigns=campaigns) `
@qitia , We are using an account with API USER permissions to authenticate with the API. Could this be the reason why we can't update the Campaign?
in your code, you set campaigns = campaigns.Campaign.append(campaign)? thus the campaigns is none. You should just call campaigns.Campaign.append(campaign). Pls reopen this if it does not help.
@qitia, No, it didn't help
Don't close the issue until it's fully resolved
OK, let's reopen it. Did you fix the code pointed above? @vp-at-st
Yes, I did. Got a response that I had to paste on a different ticket because you closed this ticket for some reason. Check it here for details: https://github.com/BingAds/BingAds-Python-SDK/issues/238
Getting the following error when trying to update a FinalUrlSuffix for a particular Campaign Id.
Method: UpdateCampaigns() Language: python
ERROR: suds.WebFault: Server raised fault: Invalid client data. Check the SOAP fault details for more information.
TrackingId: f1448115-fbed-4ae4-9f8b-ad1f0bcb3981.