RE: Issue with adding members to the existing CrmBasedUserList using Adwords API

69 views
Skip to first unread message

googleadsapi...@google.com

unread,
Feb 25, 2019, 3:13:55 PM2/25/19
to AdWords API and Google Ads API Forum
Hello Alexander, 

The error UserListError.CONCRETE_TYPE_REQUIRED indicates that you need to specify the type of user list used in your request. You may check the sample SOAP request below with type for reference.

<operand xmlns:ns8="https://adwords.google.com/api/adwords/rm/v201809" xsi:type="ns8: CrmBasedUserList">

You can also see the sample codes here as a reference in different languages. If you're still having an issue, could you please share the API SOAP logs so I can take a closer look? You may refer to the readMe section of the client library for guidance on how to enable logging. You can share the details privately via Reply privately to author option.

Regards,
Bharani, AdWords API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Lars Hemel

unread,
Sep 25, 2019, 10:42:30 AM9/25/19
to AdWords API and Google Ads API Forum
Hello Bharani,

I am receiving the UserListError.CONCRETE_TYPE_REQUIRED error, but have checked all resources online and cannot find where I go wrong.

I have created a CrmBasedUserList and would like to add Member of hashedEmail and hashedPhoneNumber. Some of the things I found online:
* The CrmBasedUserList has listType CRM_BASED so that should look good allthough I read online a lot about that I might be missing operand type in my soal call. But this is not added by default by the MutateMembersOperand class.
* I have updated to the latest version googleads-php-lib/43.0.0.
* I have tried changing the MutateMembersOperation order of setOperand and setOperator, but that did not help (nor should it be!).

This is part of my code:

$mutMembers = new MutateMembersOperand();
$mutMembers->setUserListId($userListId);
$memberList[] = new Member($hashedEmail, $mobileId, $hashedPhoneNumber, $addressInfo, $userId);
$mutMembers->setMembersList($memberList);
$operations = [];
$operation = new MutateMembersOperation();
$operation->setOperand($mutMembers);
$operation->setOperator(Operator::ADD);
$operations[] = $operation;

$userListNew = $userListService->mutate($operations)->getValue()[0];

And here is the resulting SOAP.

AW_SOAP.NOTICE: POST /api/adwords/rm/v201809/AdwordsUserListService?wsdl HTTP/1.1
Connection: close
User-Agent: PHP-SOAP/7.2.20RC1
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 2012
Authorization: REDACTED

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809" xmlns:ns2="https://adwords.google.com/api/adwords/rm/v201809" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns2:RequestHeader><ns1:developerToken>REDACTED</ns1:developerToken><ns1:userAgent>XXXX (AwApi-PHP, googleads-php-lib/43.0.0, PHP/7.2.20RC1)</ns1:userAgent><ns1:validateOnly>false</ns1:validateOnly><ns1:partialFailure>false</ns1:partialFailure></ns2:RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns2:mutate><ns2:operations xsi:type="ns2:MutateMembersOperation"><ns1:operator>ADD</ns1:operator><ns2:operand><ns2:userListId>853860912</ns2:userListId><ns2:membersList><ns2:hashedEmail>d480ad3fc4b40ae4361e4b26e223a0a5c0f04e3baf92a600ff42690d5576d136</ns2:hashedEmail><ns2:hashedPhoneNumber>4dc2b26583b308da70acbee670b5a5946dc37ca38ee71f9be023a0b093fa5b2b</ns2:hashedPhoneNumber></ns2:membersList></ns2:operand></ns2:operations></ns2:mutate></SOAP-ENV:Body></SOAP-ENV:Envelope>

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Date: Wed, 25 Sep 2019 14:33:57 GMT
Expires: Wed, 25 Sep 2019 14:33:57 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="46,43"
Accept-Ranges: none
Vary: Accept-Encoding
Connection: close

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ns2:ResponseHeader xmlns:ns2="https://adwords.google.com/api/adwords/rm/v201809" xmlns="https://adwords.google.com/api/adwords/cm/v201809"><requestId>000593618b0468990a812f8f26082726</requestId><serviceName>AdwordsUserListService</serviceName><methodName>mutate</methodName><operations>1</operations><responseTime>121</responseTime></ns2:ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>[UserListError.CONCRETE_TYPE_REQUIRED @ operations[0].operand]</faultstring><detail><ns2:ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201809" xmlns:ns2="https://adwords.google.com/api/adwords/rm/v201809"><message>[UserListError.CONCRETE_TYPE_REQUIRED @ operations[0].operand]</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:UserListError"><fieldPath>operations[0].operand</fieldPath><fieldPathElements><field>operations</field><index>0</index></fieldPathElements><fieldPathElements><field>operand</field></fieldPathElements><trigger></trigger><errorString>UserListError.CONCRETE_TYPE_REQUIRED</errorString><ApiError.Type>UserListError</ApiError.Type><ns2:reason>CONCRETE_TYPE_REQUIRED</ns2:reason></errors></ns2:ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>

Exeptionerror: 0 [UserListError.CONCRETE_TYPE_REQUIRED @ operations[0].operand]

Hope you can help and see what I am missing?

Cheers
Lars

Google Ads API Forum Advisor Prod

unread,
Sep 29, 2019, 11:02:31 PM9/29/19
to lars...@gmail.com, adwor...@googlegroups.com
Hi Lars,

Instead of calling $userListService->mutate($operations), can you please try $userListService->mutateMembers($operations)? This sample code shows the exact details for adding members to a user list. Please let me know if that solves your issue.


Thanks,
Poki, Google Ads API Team

ref:_00D1U1174p._5001UHHvPi:ref
Reply all
Reply to author
Forward
0 new messages