Cant retrieve final url of expanded ads

81 views
Skip to first unread message

Gabriel Abadi

unread,
Jul 6, 2016, 3:08:38 PM7/6/16
to AdWords API Forum
I'm having issues with expanded ads.
No matter i ask for url, urls, final url, final urls i can not retrieve it
Here i have some example:

    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201605" soapenv:mustUnderstand="0">
            <ns1:clientCustomerId>4476618128</ns1:clientCustomerId>
            <ns1:developerToken>REDACTED</ns1:developerToken>
            <ns1:userAgent>something (AwApi-Java, AdWords-Axis/2.15.0, Common-Java/2.15.0, Axis/1.4, Java/1.8.0_65, maven, SelectorBuilder, SelectorField)</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>true</ns1:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <serviceSelector>
                <fields>Id</fields>
                <fields>Status</fields>
                <fields>HeadlinePart1</fields>
                <fields>HeadlinePart2</fields>
                <fields>Description</fields>
                <fields>Path1</fields>
                <fields>Path2</fields>
                <fields>FinalUrl</fields>
                <fields>DevicePreference</fields>
                <fields>AdGroupId</fields>
                <predicates>
                    <field>CampaignId</field>
                    <operator>IN</operator>
                    <values>622217410</values>
                </predicates>
                <predicates>
                    <field>AdType</field>
                    <operator>EQUALS</operator>
                    <values>EXPANDED_TEXT_AD</values>
                </predicates>
                <paging>
                    <numberResults>10000</numberResults>
                </paging>
            </serviceSelector>
        </get>
    </soapenv:Body>
</soapenv:Envelope>

2016/07/06 14:47:14 WARN logging.AdsServiceLoggers: SOAP Response:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201605">
            <requestId>000536fb28ddccc90a37c3cb380a8236</requestId>
            <serviceName>AdGroupAdService</serviceName>
            <methodName>get</methodName>
            <operations>1</operations>
            <responseTime>137</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>[SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'FinalUrl']</faultstring>
            <detail>
                <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201605">
                    <message>[SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'FinalUrl']</message>
                    <ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SelectorError">
                        <fieldPath>serviceSelector</fieldPath>
                        <trigger>FinalUrl</trigger>
                        <errorString>SelectorError.INVALID_FIELD_NAME</errorString>
                        <ApiError.Type>SelectorError</ApiError.Type>
                        <reason>INVALID_FIELD_NAME</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

If you need it, this is the response for final urls

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201605">
            <requestId>000536fb2904b5b80a37ccc73a026984</requestId>
            <serviceName>AdGroupAdService</serviceName>
            <methodName>get</methodName>
            <operations>1</operations>
            <responseTime>137</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>[SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'FinalUrls']</faultstring>
            <detail>
                <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201605">
                    <message>[SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'FinalUrls']</message>
                    <ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SelectorError">
                        <fieldPath>serviceSelector</fieldPath>
                        <trigger>FinalUrls</trigger>
                        <errorString>SelectorError.INVALID_FIELD_NAME</errorString>
                        <ApiError.Type>SelectorError</ApiError.Type>
                        <reason>INVALID_FIELD_NAME</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>


Thanks in advance

Anthony Madrigal

unread,
Jul 6, 2016, 4:22:35 PM7/6/16
to AdWords API Forum
Hi Gabriel,

In order to get the final URLs, you will need to select it using CreativeFinalUrls. If you are still having issues, please let me know.

Regards,
Anthony
AdWords API Team

Gabriel Abadi

unread,
Jul 7, 2016, 12:48:01 PM7/7/16
to AdWords API Forum
Thanks, that was the issue

Paul Grenyer

unread,
Nov 2, 2016, 1:26:29 PM11/2/16
to AdWords API Forum
I'm having a similar problem, but using CreativeFinalUrls isn't fixing it for me:


final SelectorBuilder selector =  new SelectorFactory()

           
.build(AdGroupAdField.Id,
                   
AdGroupAdField.AdGroupId,
                   
AdGroupAdField.Status,
                   
AdGroupAdField.CreativeFinalUrls,
                   
AdGroupAdField.CreativeFinalAppUrls,
                   
AdGroupAdField.CreativeFinalMobileUrls)          
           
.orderAscBy(AdGroupAdField.Id)
           
.in(AdGroupAdField.Id, adIdsAsStrings.toArray(new String[]{}))
           
.equals("AdType", getAdType());


Calling getFinalUrls on the ExpandedTextAd returns null every time. I'm getting the other fields such as headline and description just fine.

Anthony Madrigal

unread,
Nov 2, 2016, 1:53:07 PM11/2/16
to AdWords API Forum
Hi Paul,

Since this is an old post, could you please create a new topic with your issue? This will help us track the issue better on our side.

Thanks,
Anthony
AdWords API Team
Reply all
Reply to author
Forward
0 new messages