After reading some conflicting documentation around URL limits I tried to 
right some test code to verify the true limit through the API.
 
According to this page, the limit should be 2083 bytes in UTF-8.
https://developers.google.com/adwords/api/docs/appendix/limits
 
But then this page says 2048 characters
https://support.google.com/adwords/answer/2404246?hl=en
 
The ad words editor also shows the wrong string when you type a URL over 
the limit.
 
So I wanted to know what the actual length is.  I was able to successfully 
ingest a 2083 character length URL through the editor. But then through the 
UI I wasn't even able to submit this URL of 2076 characters.
 
<soap:Body>
    <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201302";>
      <operations>
        <operator>ADD</operator>
        <operand xsi:type="BiddableAdGroupCriterion">
          <adGroupId>XXXXXXXX</adGroupId>
          <criterion xsi:type="Keyword">
            <text>uranus</text>
            <matchType>BROAD</matchType>
          </criterion>
          <userStatus>PAUSED</userStatus>
        
<destinationUrl>http://example.com/mars/cruise/234567890123456789012345678901234567890123456789012567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456123456789034567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678905678901234567890123456789089012345678901234561234567890123456789072789012323456789012345678901234567890123456789012345/789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234561234567890345678901234567890789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567123456789012345678901234567890123456787890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345679017890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345672345678901234567890234567890123456789056789012345678901234567890890123456778901234567890345612345178901234567890123456789089012345677890123456789012345678908901778901234567890123456789089012345677890123456789012345673456123458908901234567890123456789012345678908901234567234567234534561234567890890123456778901234567890123456789089567890123401234561234567891234567890123456782713Darren2076</destinationUrl>
        </operand>
      </operations>
    </mutate>
  </soap:Body>
 
 
I got this error. Please advise as to what the correct length should be.
 
 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201302
">
      <requestId>0004e095cf98b4b80a42176900007a80</requestId>
      <serviceName>AdGroupCriterionService</serviceName>
      <methodName>mutate</methodName>
      <operations>1</operations>
      <responseTime>483</responseTime>
      <units>0</units>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      
<faultstring>[PolicyViolationError{super=PolicyViolationError.POLICY_ERROR 
@ operations[0].operand.destinationUrl; 
trigger:'http://example.com/mars/cruise/234567890123456789012345678901234567890123456789012567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456123456789034567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678905678901234567890123456789089012345678901234561234567890123456789072789012323456789012345678901234567890123456789012345/789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234561234567890345678901234567890789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567123456789012345678901234567890123456787890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345679017890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345672345678901234567890234567890123456789056789012345678901234567890890123456778901234567890345612345178901234567890123456789089012345677890123456789012345678908901778901234567890123456789089012345677890123456789012345673456123458908901234567890123456789012345678908901234567234567234534561234567890890123456778901234567890123456789089567890123401234561234567891234567890123456782713Darren2076',
 
key=PolicyViolationKey{policyName=malformed_destination_url,violatingText=http://example.com/mars/cruise/234567890123456789012345678901234567890123456789012567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456123456789034567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678905678901234567890123456789089012345678901234561234567890123456789072789012323456789012345678901234567890123456789012345/789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234561234567890345678901234567890789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567123456789012345678901234567890123456787890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345679017890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345672345678901234567890234567890123456789056789012345678901234567890890123456778901234567890345612345178901234567890123456789089012345677890123456789012345678908901778901234567890123456789089012345677890123456789012345673456123458908901234567890123456789012345678908901234567234567234534561234567890890123456778901234567890123456789089567890123401234561234567891234567890123456782713Darren2076},
 
externalPolicyName=Google AdWords, externalPolicyUrl=, 
externalPolicyDescription=This ad or keyword requires review before it can 
run., isExemtable=true, violatingParts=[Part{index=0, length=2076}]}, 
PolicyViolationError{super=PolicyViolationError.POLICY_ERROR @ 
operations[0].operand.destinationUrl; 
trigger:'4567890123456782713Darren2076', 
key=PolicyViolationKey{policyName=line_overflow,violatingText=4567890123456782713Darren2076},
 
externalPolicyName=Google AdWords, externalPolicyUrl=, 
externalPolicyDescription=This ad or keyword requires review before it can 
run., isExemtable=false, violatingParts=[Part{index=2047, 
length=29}]}]</faultstring>
      <detail>
        <ApiExceptionFault xmlns="
https://adwords.google.com/api/adwords/cm/v201302";>
          
<message>[PolicyViolationError{super=PolicyViolationError.POLICY_ERROR @ 
operations[0].operand.destinationUrl; 
trigger:'http://example.com/mars/cruise/234567890123456789012345678901234567890123456789012567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456123456789034567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678905678901234567890123456789089012345678901234561234567890123456789072789012323456789012345678901234567890123456789012345/789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234561234567890345678901234567890789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567123456789012345678901234567890123456787890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345679017890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345672345678901234567890234567890123456789056789012345678901234567890890123456778901234567890345612345178901234567890123456789089012345677890123456789012345678908901778901234567890123456789089012345677890123456789012345673456123458908901234567890123456789012345678908901234567234567234534561234567890890123456778901234567890123456789089567890123401234561234567891234567890123456782713Darren2076',
 
key=PolicyViolationKey{policyName=malformed_destination_url,violatingText=http://example.com/mars/cruise/234567890123456789012345678901234567890123456789012567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456123456789034567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678905678901234567890123456789089012345678901234561234567890123456789072789012323456789012345678901234567890123456789012345/789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234561234567890345678901234567890789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567123456789012345678901234567890123456787890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345679017890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345672345678901234567890234567890123456789056789012345678901234567890890123456778901234567890345612345178901234567890123456789089012345677890123456789012345678908901778901234567890123456789089012345677890123456789012345673456123458908901234567890123456789012345678908901234567234567234534561234567890890123456778901234567890123456789089567890123401234561234567891234567890123456782713Darren2076},
 
externalPolicyName=Google AdWords, externalPolicyUrl=, 
externalPolicyDescription=This ad or keyword requires review before it can 
run., isExemtable=true, violatingParts=[Part{index=0, length=2076}]}, 
PolicyViolationError{super=PolicyViolationError.POLICY_ERROR @ 
operations[0].operand.destinationUrl; 
trigger:'4567890123456782713Darren2076', 
key=PolicyViolationKey{policyName=line_overflow,violatingText=4567890123456782713Darren2076},
 
externalPolicyName=Google AdWords, externalPolicyUrl=, 
externalPolicyDescription=This ad or keyword requires review before it can 
run., isExemtable=false, violatingParts=[Part{index=2047, 
length=29}]}]</message>
          
<ApplicationException.Type>ApiException</ApplicationException.Type>
          <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="PolicyViolationError">
            <fieldPath>operations[0].operand.destinationUrl</fieldPath>
            
<trigger>http://example.com/mars/cruise/234567890123456789012345678901234567890123456789012567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456123456789034567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678905678901234567890123456789089012345678901234561234567890123456789072789012323456789012345678901234567890123456789012345/789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234561234567890345678901234567890789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567123456789012345678901234567890123456787890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345679017890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345672345678901234567890234567890123456789056789012345678901234567890890123456778901234567890345612345178901234567890123456789089012345677890123456789012345678908901778901234567890123456789089012345677890123456789012345673456123458908901234567890123456789012345678908901234567234567234534561234567890890123456778901234567890123456789089567890123401234561234567891234567890123456782713Darren2076</trigger>
            <errorString>PolicyViolationError.POLICY_ERROR</errorString>
            <ApiError.Type>PolicyViolationError</ApiError.Type>
            <key>
              <policyName>malformed_destination_url</policyName>
              
<violatingText>http://example.com/mars/cruise/234567890123456789012345678901234567890123456789012567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456123456789034567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678905678901234567890123456789089012345678901234561234567890123456789072789012323456789012345678901234567890123456789012345/789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234561234567890345678901234567890789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345677890123456789012345678908901234567123456789012345678901234567890123456787890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345679017890123456789012345678908901234567789012345678901234567890890123456778901234567890123456789089012345672345678901234567890234567890123456789056789012345678901234567890890123456778901234567890345612345178901234567890123456789089012345677890123456789012345678908901778901234567890123456789089012345677890123456789012345673456123458908901234567890123456789012345678908901234567234567234534561234567890890123456778901234567890123456789089567890123401234561234567891234567890123456782713Darren2076</violatingText>
            </key>
            <externalPolicyName>Google AdWords</externalPolicyName>
            <externalPolicyUrl></externalPolicyUrl>
            <externalPolicyDescription>This ad or keyword requires review 
before it can run.</externalPolicyDescription>
            <isExemptable>true</isExemptable>
            <violatingParts>
              <index>0</index>
              <length>2076</length>
            </violatingParts>
          </errors>
          <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="PolicyViolationError">
            <fieldPath>operations[0].operand.destinationUrl</fieldPath>
            <trigger>4567890123456782713Darren2076</trigger>
            <errorString>PolicyViolationError.POLICY_ERROR</errorString>
            <ApiError.Type>PolicyViolationError</ApiError.Type>
            <key>
              <policyName>line_overflow</policyName>
              <violatingText>4567890123456782713Darren2076</violatingText>
            </key>
            <externalPolicyName>Google AdWords</externalPolicyName>
            <externalPolicyUrl></externalPolicyUrl>
            <externalPolicyDescription>This ad or keyword requires review 
before it can run.</externalPolicyDescription>
            <isExemptable>false</isExemptable>
            <violatingParts>
              <index>2047</index>
              <length>29</length>
            </violatingParts>
          </errors>
        </ApiExceptionFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope><?xml version="1.0" encoding="utf-8"?>

 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to