Cannot get custom objects from SOAP API
Hi,
I'm trying to get custom objects using the SOAP API but the call fails with this error:
<ns1:serviceException xmlns:ns1="http://www.marketo.com/mktows/"><name>mktValidationException</name><message>Unknown name key list: serviceName</message><code>10001</code></ns1:serviceException>
I have tested with several fields and double checked the spelling.
The code I'm using is this:
var parameters = new ParamsGetCustomObjects();
parameters.objTypeName = "<name of custom object, spelling is correct>";
parameters.batchSize = 100;
parameters.batchSizeSpecified = true;
parameters.customObjKeyList = new[]
{
new Attribute
{
attrName = "userEmail",
attrValue = request.UserEmail,
attrType = "string"
}
};
parameters.includeAttributes = new[]
{
"userEmail",
"serviceName"
};
var result = client.getCustomObjects(parameters);
I can for example get leads so the api and credentials are working.
What am I missing?
Thanks,
Rickard