Answer the question
In order to leave comments, you need to log in
How to add phone to companies adwords api?
$campaignExtensionSettingService = $user->GetService('CampaignExtensionSettingService', ADWORDS_VERSION);
$campaignExtensionSetting = new CampaignExtensionSetting();
$campaignExtensionSetting->campaignId = $campaignId;
$campaignExtensionSetting->extensionType = 'CALL';
$campaignExtensionSetting->extensionSetting = new ExtensionSetting();
$campaignExtensionSetting->extensionSetting->extensions = array();
// добавляем телефон
$phone = new CallFeedItem();
$phone->callCountryCode = "RU";
$phone->callPhoneNumber = "+7 (495) 587-75-75";
$campaignExtensionSetting->extensionSetting->extensions[] = $phone;
$operation = new CampaignExtensionSettingOperation();
$operation->operator = 'ADD';
$operation->operand = $campaignExtensionSetting;
$operations = array($operation);
$result = $campaignExtensionSettingService->mutate($operations);
Answer the question
In order to leave comments, you need to log in
Also faced this problem. Same error.
I had to go the other way, adding the phone through Feeds. In the examples for the library, there is an example of adding a Sitelink via Feeds, by analogy I did it for phones. A lot more code, but it works. Link to example:
https://github.com/googleads/googleads-php-lib/blo...
I didn’t use the API myself, but I would try countrycode 7, and callphonenumber 495-587-7575
https://developers.google.com/adwords/api/docs/gui...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question