Hi, I believe the cause of this error is that you are trying to use an email address as a campaign ID. Campaign id's are numerical, and can be obtained by running CampaignService.get() with an empty selector. Here is an example:
http://code.google.com/p/google-api-adwords-php/source/browse/trunk/examples/v200909/GetAllCampaigns.php Best, - Eric Koleda, AdWords API Team On Jan 27, 3:26 am, HMcorp <[email protected]> wrote: > 이번에 구글 애드워즈 API 를 PHP 버전으로 변경, 업데이트하려고 준비중입니다. > > 기존에 있던 모듈 버전이 v13 이던가요.. > 해당 모듈은 저희의 윈도우서버에서 .Net (asp) 으로 개발되어 잘 사용하고 있었는데요. > 이것을 php 버전으로 바꾸게 되면서 도메인도 서브 도메인으로 바꾸게 되었습니다. > 혹시라도 도메인이 달라서 오류가 나는 것은 아닌가 싶어서 이 내용을 적습니다. > > 애드워즈 API v200909 버전으로 다운 받아서 그 안에 있는 예제파일로 테스트하는데, > 오류메시지가 계속 발생해서 이렇게 문의를 해봅니다. > > 아래는 phpinfo() 를 실행했을때 나오는 설정값 중 일부분인데요, > 저희쪽 서버에 soap 외에도 필요한 모듈이 더 있는지 확인 부탁드리려고 기입했습니다. > > PHP Version 5.2.6 > System Linux www.********.co.kr 2.6.23.15-137.fc8 #1 SMP Sun Feb 10 > 17:48:34 EST 2008 i686 > Configure Command './configure' '--build=i386-redhat-linux-gnu' '-- > host=i386-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '-- > program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/ > bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' > '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/ > libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/ > usr/share/man' '--infodir=/usr/share/info' '--cache-file=../ > config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '-- > with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' > '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with- > exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '-- > enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' > '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '-- > with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with- > zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable- > magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' > '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '-- > enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' > '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' > '--enable-calendar' '--enable-dbx' '--enable-dio' '--without-mime- > magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '-- > with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '-- > without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '-- > without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable- > xmlwriter' '--disable-json' Server API Apache 2.0 Handler > > soap > Soap Client enabled > Soap Server enabled > > Directive / Local Value / Master Value > soap.wsdl_cache 1 1 > soap.wsdl_cache_dir /tmp /tmp > soap.wsdl_cache_enabled 1 1 > soap.wsdl_cache_limit 5 5 > soap.wsdl_cache_ttl 86400 86400 > > phpinfo() 내용 전체가 필요하신 경우 phpinfo() 내용을 볼수 있는 URL을 알려드리겠습니다.. > > 설정중에 auth.ini 파일에서 > email, password, applicationToken, developerToken 항목들은 주어진 값대로 올바르게 세팅했 > 는데요. > userAgent 항목은 정확히 무엇을 의미하는지 몰라 HMCorp co.Ltd 라고만 기입했습니다. > clientId 는 주석처리를 해제하지 않았구요.. > 기존에 사용하던 email은 [email protected] 이고요, 이 아이디로 php 버전도 사용하려 하고 있습니다. > > settings.ini 파일에서는 > 하단의 DEFAULT_SERVER = "https://adwords.google.com" 만 > DEFAULT_SERVER = "https://adwords-sandbox.google.com" 로 변경했습니다. > (뭐 사실 두가지 모두 테스트해봐도 결과는 오류메시지가 나왔습니다..) > > googleapi/examples/v200909/GetAllCampaigns.php > 위에 설명한 설정의 상태에서 위 URL 로 접속하면 No campaigns were found. 이렇게 나오구요.. > > googleapi/examples/v200909/GetAllCampaignTargets.php > $campaignId = '[email protected]'; 로 설정해서 위 URL 로 접속하면 아래와 같은 장문의 에러 > 메시지가 나옵니다. > > SoapFault Object > ( > [message:protected] => [RangeError.TOO_LOW @ selector.campaignIds > [0].id] > [string:private] => > [code:protected] => 0 > [file:protected] => /service/hmcorp/public_html/googleapi/src/ > Google/Api/Ads/Common/Lib/AdsSoapClient.php > [line:protected] => 160 > [trace:private] => Array > ( > [0] => Array > ( > [file] => /service/hmcorp/public_html/googleapi/ > src/Google/Api/Ads/Common/Lib/AdsSoapClient.php > [line] => 160 > [function] => __soapCall > [class] => SoapClient > [type] => -> > [args] => Array > ( > [0] => get > [1] => Array > ( > [0] => CampaignTargetServiceGet > Object > ( > [selector] => > CampaignTargetSelector Object > ( > [campaignIds] => > Array > ( > [0] => > [email protected] > ) > > ) > > ) > > ) > > [2] => > [3] => > [4] => Array > ( > ) > > ) > > ) > > [1] => Array > ( > [file] => /service/hmcorp/public_html/googleapi/ > src/Google/Api/Ads/AdWords/v200909/cm/CampaignTargetService.php > [line] => 3656 > [function] => __soapCall > [class] => AdsSoapClient > [type] => -> > [args] => Array > ( > [0] => get > [1] => Array > ( > [0] => CampaignTargetServiceGet > Object > ( > [selector] => > CampaignTargetSelector Object > ( > [campaignIds] => > Array > ( > [0] => > [email protected] > ) > > ) > > ) > > ) > > ) > > ) > > [2] => Array > ( > [file] => /service/hmcorp/public_html/googleapi/ > examples/v200909/GetAllCampaignTargets.php > [line] => 61 > [function] => get > [class] => CampaignTargetService > [type] => -> > [args] => Array > ( > [0] => CampaignTargetSelector Object > ( > [campaignIds] => Array > ( > [0] => > [email protected] > ) > > ) > > ) > > ) > > ) > > [faultstring] => [RangeError.TOO_LOW @ selector.campaignIds[0].id] > [faultcode] => soap:Server > [detail] => stdClass Object > ( > [ApiExceptionFault] => stdClass Object > ( > [message] => [RangeError.TOO_LOW @ > selector.campaignIds[0].id] > [ApplicationException.Type] => ApiException > [errors] => SoapVar Object > ( > [enc_type] => 0 > [enc_value] => RangeError Object > ( > [reason] => TOO_LOW > [fieldPath] => selector.campaignIds > [0].id > [trigger] => > [ApiErrorType] => RangeError > [_parameterMap:private] => Array > ( > [ApiError.Type] => > ApiErrorType > ) > > ) > > [enc_stype] => RangeError > [enc_ns] > =>https://adwords.google.com/api/adwords/cm/v200909 > ) > > ) > > ) > > ) > > 저희쪽에서 최종적으로 작업완료시키고자 하는 사항은 딱 1가지 입니다. > 고객이 자신의 아이디(이메일주소)를 적고 결제를 하면, > 결제한 잔액(부가세 제외한..)만큼 해당 아이디의 잔액이 충전되는 형태입니다. > > 예제로 보면 UpdateAdGroupCriterion.php 파일안의 내용을 사용해야 할 것 같은데, > 실행해도 역시 오류 메시지만 나오니 답답합니다.. > > 어디가 어떻게 잘못되었는지 답변 부탁드립니다. > 잘부탁합니다. 감사합니다. -- 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.
