U
U
Ultraice2015-08-18 15:20:38
API
Ultraice, 2015-08-18 15:20:38

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);

"+7 (495) 587-75-75" - [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.(InternalApiErro]
"587-75-75" - [ExtensionSettingError.PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY @ operations[0].operand.extensionSetting.extensions[0].callPhoneNumber] I'm trying
different options, maybe it doesn't work at all on a test account?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Lebedev, 2015-08-21
@Ultraice

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...

A
Artyom Tsyplakov, 2015-08-18
@grimich

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 question

Ask a Question

731 491 924 answers to any question