Hello,

I'm working in python and following this 
documentation: 
https://developers.google.com/adwords/api/docs/samples/python/campaign-management#add-keywords-using-an-incremental-batch-job

I'm trying to modify that code to upload a final URL for each keyword. This 
is what my call looks like:

  def BuildAdGroupCriterionOperations(keyword_list):         
            criterion_operations = [
                {
                    'xsi_type': 'AdGroupCriterionOperation',
                    'operand': {
                        'xsi_type': 'BiddableAdGroupCriterion',
                        'adGroupId': keyword[2],
                        'criterion': {
                            'xsi_type': 'Keyword',
                            'text': keyword[0],
                            'matchType': 'BROAD',
                        },
                        # These fields are optional.
                        'userStatus': 'PAUSED',
                        'finalUrls': {
                            'urls': keyword[1],
                        },  # The finalURLs is causing an error
                    },
                    'operator': 'ADD'
                }
                for keyword in keyword_list]


            return criterion_operations
keyword_lists is a list of lists that looks like this: [[keyword, 
final_url, adgroup_id],[keyword, final_url, adgroup_id], ext...]

This is the error I'm getting: 

> Operation 0 - FAILURE:
>
> errorType=AdGroupCriterionError
>
> trigger=None
>
>
>> errorString=AdGroupCriterionError.CANNOT_MODIFY_URL_FIELDS_WITH_DUPLICATE_ELEMENTS
>
> fieldPath=operations[0].operand
>
> reason=CANNOT_MODIFY_URL_FIELDS_WITH_DUPLICATE_ELEMENTS
>
> The script works fine if I comment out the finalURLs part.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 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/0c1f587b-8580-44bf-b458-1c2d1e7ea3eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Adding FinalURLs... Edward Bernays
    • Re: Adding ... 'Vincent Racaza (AdWords API Team)' via AdWords API Forum
      • Re: Add... Edward Bernays
        • Re:... 'Vincent Racaza (AdWords API Team)' via AdWords API Forum
          • ... Edward Bernays

Reply via email to