Hi, 

I am using the example code for update and Expanded Text and looks ok, but 
When I use something similar to ImageAd always I having the same response: 

[2020-04-13 10:04:42] AW_SOAP.WARNING: clientCustomerId=XXXXXXXXX 
operations=1 service=AdService method=mutate responseTime=182 
requestId=0005a327891074600a37920489042c15 server=adwords.google.com 
isFault=1 faultMessage=[*AdError.INVALID_AD_TYPE @ operations[0].operand.id*
]

$adService = $adWordsServices->get($session, AdService::class);

$operations = [];

$imageAd = new ImageAd();
$imageAd->setId($adGroupAd->getAd()->getId());

$imageAd->setName(date('YmdHis'));

$operation = new AdOperation();
$operation->setOperand($imageAd);
$operation->setOperator(Operator::SET);
$operations[] = $operation;

// Updates the ad on the server.
$result = $adService->mutate($operations);
$updatedAd = $result->getValue()[0];


If I set the type, AdType or both, the response is always the same.

Can you help me, please.?


On Friday, 10 April 2020 08:12:23 UTC+2, Héctor Prieto wrote:
>
> Then, just for update the name I need to set all fields? Because if I 
> create a new instance I am having an empty object.
>
> El El mié, 8 abr 2020 a las 21:19, Google Ads API Forum Advisor Prod <
> [email protected]> escribió:
>
>> Hi Héctor,
>>
>> Thank you for reaching out. When you update the ad, you would need to 
>> create a new instance of the type of the ad and then pass in the ad id 
>> you’d like to update. Please refer to this code example 
>> <https://developers.google.com/adwords/api/docs/samples/php/basic-operations#update-an-expanded-text-ad>
>>  
>> on how to update an existing ad. Please let me know if you have any further 
>> questions.
>>
>> Thanks and Regards,
>> Xiaoming, Google Ads API Team
>>
>>
>>  
>>
>> ref:_00D1U1174p._5001UZWtY5:ref
>>
> -- 
>   
>
>  
>   
> Héctor Prieto
> Software Developer
> [email protected]    
>
>  
>  
>
>  
>  
>   [image: Telecoming - Make it digital]                 
> [image: 5000_empresas]           
> [image: 1000_empresas]  
>   
> Paseo de la Castellana, 95. Torre Europa, pl 16. 28046 Madrid, Spain | 
> telecoming.com <http://www.telecoming.com/>
>
>  
>  
>   Este correo electrónico y sus archivos adjuntos están dirigidos 
> únicamente a la(s) dirección(es) indicada(s) anteriormente. El carácter 
> confidencial, personal e intransferible del mismo está protegido 
> legalmente. Cualquier publicación, reproducción, distribución o 
> retransmisión no autorizada, ya sea completa o en parte, se encuentra 
> prohibida. Si ha recibido este mensaje por equivocación, notifíquelo 
> inmediatamente a la persona que lo ha enviado y borre el mensaje original 
> junto con sus ficheros anexos sin leerlo ni grabarlo en modo alguno.
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ad3c983c-6f5d-41c5-b8d3-fc212d85aa7d%40googlegroups.com.

Reply via email to