Grow your business by advertising on bing, MSN, Xbox, and more!
Hi ,
Since this morning REST api calls to get negative keywords on adgroup or campaign fail.
Nothing has changed in how I call it.
{"TrackingId":"0e04b5f4-54d0-44a5-a760-a2b50e290a2a","Errors":[{"Code":0,"Detail":null,"ErrorCode":"InternalError","Message":"An internal error has occurred."}]}
Alex.
Actually all SOAP calls fail as well
for example GetAdGroupsByCampaignId
returns :
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body><s:Fault><faultcode>s:Client</faultcode>
<faultstring xml:lang="en-US">Internal system error. Check the SOAP fault details for more information</faultstring>
<detail><ApiFaultDetail xmlns="https://adcenter.microsoft.com/v8" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<TrackingId xmlns="https://adapi.microsoft.com">eb122db4-600c-44fd-b6d1-41a180f25529</TrackingId>
<BatchErrors/>
<OperationErrors><OperationError>
<Code>0</Code><Details i:nil="true"/><ErrorCode>InternalError</ErrorCode>
<Message>An internal error has occurred.</Message>
</OperationError>
</OperationErrors></ApiFaultDetail>
</detail></s:Fault>
</s:Body>
</s:Envelope>
But SOAP AddAdGroupsRequest works fine.
nope , still errors SOAP and REST
my REST python example :
from urllib2 import HTTPError,URLError
import simplejson as json
import urllib2
REQUEST_STRING = json.dumps({ 'AdGroupIds': [775710747]})
def main():
try:
baseUri = 'https://adcenterapi.microsoft.com/Api/Advertiser/v8/CampaignManagement/CampaignManagementServiceREST.svc'
uriTemplate = '/customer/account/campaign/140039046/adGroup?$field=negativeKeywords'
formatString = '&format=json'
uri = baseUri + uriTemplate + formatString
print(uri);
print(" request " + REQUEST_STRING);
encodedRequest = REQUEST_STRING.encode()
# Load the header values for the POST
headers = {"Content-Type": "application/json",
"Content-Length": str(len(encodedRequest)),
"CustomerAccountId": "XXXX",
"DeveloperToken" : 'XXXXXX',
"UserName" : "XXXXXX",
"Password" : "XXXXX"}
request = urllib2.Request(uri, encodedRequest, headers)
# Call the service operation and process the response. If
# the request generates a fault, urlopen raises a HTTPError
# exception that is caught below.
response = urllib2.urlopen(request)
# Get the JSON response text
body = response.read()
print(" response " + body.decode("utf8"))
# Raised if the request fails or generates a fault. An INTERNAL_SERVER_ERROR
# error indicates a fault. HTTP error code 400 indicates that the message is
# malformed or contains invalid data.
except HTTPError , error:
print(" HTTP Error Code: " + str(error.code))
print(" fault " + error.read().decode("utf8"))
except URLError , e:
print(e)
# Starts the main loop.
main()
Thanks Eric!
To summarize :
All soap and rest calls were working fine up to yesterday.
After doing some more investigation turns out the only SOAP that was failing was GetAdGroupsByCampaignId and for some reason it started to work fine now....
The REST example I posted to get adgroup negatives does works with v7. So I hope you fix v8 soon. But to get campaign negatives doesn't work with neither although for
v7 the error message is :
{"TrackingId":"65c6bc58-a807-4e90-8ada-c53179e60eca","BatchErrors":[],"OperationErrors":[{"Code":1113,"Details":null,"ErrorCode":"CampaignServiceCampaignsArrayShouldNotBeNullOrEmpty","Message":"Campaigns array should not be null or empty."}]}
and v8
{"TrackingId":"8af26356-4302-4c55-8631-9b33ffabe379","Errors":[{"Code":0,"Detail":null,"ErrorCode":"InternalError","Message":"An internal error has occurred."}]}
All the REST v8 are fixed now , thanks !
Regarding v7, I just tried it yesterday so I'm not sure if my v7 examples ever worked before.
Thanks.
Alex Parij.
I'm not sure if this is related but I'm getting the internal error message as well.
URL: https://adcenterapi.microsoft.com/Api/Advertiser/v8/CampaignManagement/CampaignManagementServiceREST.svc/customer/account/campaign/XXXXXXX/adGroup?format=json
Here is the encoded JSON
{\"AdGroups\":[{\"AdDistribution\":[\"Search\"],\"BiddingModel\":\"Keyword\",\"BroadMatchBid\":{\"amount\":0.05},\"ContentMatchBid\":{\"amount\":0.05},\"ExactMatchBid\":{\"amount\":0.05},\"Language\":\"English\",\"Name\":\"Test Group\",\"Network\":\"OwnedAndOperatedOnly\",\"PhraseMatchBid\":{\"amount\":0.05},\"PricingModel\":\"Cpc\",\"PublisherCountries\":[\"US\"]}]}
Response:
<AdApiFaultDetail xmlns="https://adapi.microsoft.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><TrackingId>cb54a5d6-9414-40bf-a840-1429086fb551</TrackingId><Errors><AdApiError><Code>0</Code><Detail i:nil="true"/><ErrorCode>InternalError</ErrorCode><Message>An internal error has occurred.</Message></AdApiError></Errors></AdApiFaultDetail>