I am unable to create a new audience using the new Google Ads API. The 
release notes for version 0.6.0 of the API 
(https://developers.google.com/google-ads/api/docs/release-notes) claim 
that the ability to "Create audiences using UserListService" was added in 
this release. I am using version 0.6.0 of the java Google Ads SDK. Here is 
my code (it's groovy code using the java sdk, not Java code):

      // Look up an existing rule-based user list...
      UserList existingUserList = 
userListServiceClient.getUserList("customers/6257802538/userLists/4598470")

      // Use the rule-based user list I looked up to create a new user 
list. I need to clear some attributes to avoid API errors...
      UserList newUserList = UserList.newBuilder(existingUserList)
          .setName(StringValue.of("Oler user list test 1"))
          .clearId()
          .clearResourceName()
          .clearClosingReason()
          .build()

      UserListOperation userListOperation = UserListOperation.newBuilder()
          .setCreate(newUserList)
          .build()

      userListServiceClient.mutateUserLists('6257802538', 
[userListOperation])

Here is the API error I receive when I make this call:

errors {
  error_code {
    user_list_error: CONCRETE_TYPE_REQUIRED
  }
  message: "Concrete type of user list is required."
  trigger {
    string_value: ""
  }
  location {
    operation_index {
    }
  }
}

I get the same error when trying to create a LOGICAL user list instead of a 
RULE_BASED user list as I'm doing in the example. In my example code, I'm 
trying to copy an existing user list, but I've also tried creating the user 
list from scratch, and I received the exact same API error ("concrete type 
required"). I don't see where I can set things like the url on a rule-based 
user list or add references to other user lists when creating a logical 
user list. Is creating user lists really supported in 0.6.0 of the Google 
Ads API as the release notes indicate? If so, what am I doing wrong when 
I'm attempting to create these things?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/76512321-bff4-4af9-b711-dbbf1cd97687%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... Jon Oler
    • ... 'Dhanya Sundararaju (AdWords API Team)' via AdWords API and Google Ads API Forum
      • ... Jon Oler
        • ... 'Dhanya Sundararaju (AdWords API Team)' via AdWords API and Google Ads API Forum
          • ... Jon Oler
            • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to