How to update existing keyword text using adwords php client library ?
How to update a Keyword Final URL *Code I am using:* // Get the service, which loads the required classes. $adGroupCriterionService = $adWordsServices->get($session, AdGroupCriterionService::class); // Create selector. $selector = new Selector(); $selector->setFields(['KeywordText', 'KeywordMatchType', 'Id','Status','TopOfPageCpc','CpcBid','FinalUrls']); $selector->setOrdering([new OrderBy('KeywordText', 'ASCENDING')]); // Create predicates. $selector->setPredicates([new Predicate('AdGroupId', PredicateOperator::IN, [$adGroupId] )] ); $selector->setPredicates([new Predicate('CriteriaType', PredicateOperator::IN, ['KEYWORD'] )] ); $selector->setPredicates([new Predicate('Id', PredicateOperator::IN, [$keywordId] )] ); // Make the get request. $page = $adGroupCriterionService->get($selector); foreach ($page->getEntries() as $adGroupCriterion) { var_dump($adGroupCriterion); } *Response :* Google\AdsApi\AdWords\v201609\cm\BiddableAdGroupCriterion Object ( [userStatus:protected] => ENABLED [systemServingStatus:protected] => [approvalStatus:protected] => [disapprovalReasons:protected] => [destinationUrl:protected] => [firstPageCpc:protected] => [topOfPageCpc:protected] => Google\AdsApi\AdWords\v201609\cm\Bid Object ( [amount:protected] => Google\AdsApi\AdWords\v201609\cm\Money Object ( [microAmount:protected] => 123456 [ComparableValueType:protected] => [ComparableValue.Type] => Money ) ) [firstPositionCpc:protected] => [qualityInfo:protected] => [biddingStrategyConfiguration:protected] => Google\AdsApi\AdWords\v201609\cm\BiddingStrategyConfiguration Object ( [biddingStrategyId:protected] => [biddingStrategyName:protected] => [biddingStrategyType:protected] => MANUAL_CPC [biddingStrategySource:protected] => [biddingScheme:protected] => [bids:protected] => Array ( [0] => Google\AdsApi\AdWords\v201609\cm\CpcBid Object ( [bid:protected] => Google\AdsApi\AdWords\v201609\cm\Money Object ( [microAmount:protected] => 1234 [ComparableValueType:protected] => [ComparableValue.Type] => Money ) [cpcBidSource:protected] => CRITERION [BidsType:protected] => [Bids.Type] => CpcBid ) ) ) [bidModifier:protected] => [finalUrls:protected] => [finalMobileUrls:protected] => [finalAppUrls:protected] => [trackingUrlTemplate:protected] => [urlCustomParameters:protected] => [adGroupId:protected] => 12343924932 [criterionUse:protected] => BIDDABLE [criterion:protected] => Google\AdsApi\AdWords\v201609\cm\Keyword Object ( [text:protected] => Test Keyword ABCD [matchType:protected] => PHRASE [id:protected] => 12343743102 [type:protected] => KEYWORD [CriterionType:protected] => [Criterion.Type] => Keyword ) [labels:protected] => [forwardCompatibilityMap:protected] => [baseCampaignId:protected] => [baseAdGroupId:protected] => [AdGroupCriterionType:protected] => [AdGroupCriterion.Type] => BiddableAdGroupCriterion ) -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/bca84f70-8eb0-45be-a7a1-68b899f0f005%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Unable to get FinalUrls of keyword using API
Hi, I am using PHP Adwords APIs to fetch the final urls of keywords but it always returns null *Code I am using:* // Get the service, which loads the required classes. $adGroupCriterionService = $adWordsServices->get($session, AdGroupCriterionService::class); // Create selector. $selector = new Selector(); $selector->setFields(['KeywordText', 'KeywordMatchType', 'Id','Status','TopOfPageCpc','CpcBid','FinalUrls']); $selector->setOrdering([new OrderBy('KeywordText', 'ASCENDING')]); // Create predicates. $selector->setPredicates([new Predicate('AdGroupId', PredicateOperator::IN, [$adGroupId] )] ); $selector->setPredicates([new Predicate('CriteriaType', PredicateOperator::IN, ['KEYWORD'] )] ); $selector->setPredicates([new Predicate('Id', PredicateOperator::IN, [$keywordId] )] ); // Make the get request. $page = $adGroupCriterionService->get($selector); foreach ($page->getEntries() as $adGroupCriterion) { var_dump($adGroupCriterion); } *Response :* Google\AdsApi\AdWords\v201609\cm\BiddableAdGroupCriterion Object ( [userStatus:protected] => ENABLED [systemServingStatus:protected] => [approvalStatus:protected] => [disapprovalReasons:protected] => [destinationUrl:protected] => [firstPageCpc:protected] => [topOfPageCpc:protected] => Google\AdsApi\AdWords\v201609\cm\Bid Object ( [amount:protected] => Google\AdsApi\AdWords\v201609\cm\Money Object ( [microAmount:protected] => 123456 [ComparableValueType:protected] => [ComparableValue.Type] => Money ) ) [firstPositionCpc:protected] => [qualityInfo:protected] => [biddingStrategyConfiguration:protected] => Google\AdsApi\AdWords\v201609\cm\BiddingStrategyConfiguration Object ( [biddingStrategyId:protected] => [biddingStrategyName:protected] => [biddingStrategyType:protected] => MANUAL_CPC [biddingStrategySource:protected] => [biddingScheme:protected] => [bids:protected] => Array ( [0] => Google\AdsApi\AdWords\v201609\cm\CpcBid Object ( [bid:protected] => Google\AdsApi\AdWords\v201609\cm\Money Object ( [microAmount:protected] => 1234 [ComparableValueType:protected] => [ComparableValue.Type] => Money ) [cpcBidSource:protected] => CRITERION [BidsType:protected] => [Bids.Type] => CpcBid ) ) ) [bidModifier:protected] => [finalUrls:protected] => [finalMobileUrls:protected] => [finalAppUrls:protected] => [trackingUrlTemplate:protected] => [urlCustomParameters:protected] => [adGroupId:protected] => 12343924932 [criterionUse:protected] => BIDDABLE [criterion:protected] => Google\AdsApi\AdWords\v201609\cm\Keyword Object ( [text:protected] => Test Keyword ABCD [matchType:protected] => PHRASE [id:protected] => 12343743102 [type:protected] => KEYWORD [CriterionType:protected] => [Criterion.Type] => Keyword ) [labels:protected] => [forwardCompatibilityMap:protected] => [baseCampaignId:protected] => [baseAdGroupId:protected] => [AdGroupCriterionType:protected] => [AdGroupCriterion.Type] => BiddableAdGroupCriterion ) -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/c7e47e70-8bc8-40ed-85fc-3d57fd45af8e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Error "Class 'Google\AdsApi\Common\OAuth2TokenBuilder' not found"
Hi, I have set up the PHP API library and configured the developerToken, clientCustomerId, clientId, clientSecret and refreshToken in adsapi_php.ini . Now when i try to run GetCampaigns.php via terminal it throws an error "Class 'Google\AdsApi\Common\OAuth2TokenBuilder' not found in '..examples/AdWords/v201609/BasicOperations/GetCampaigns.php". I have checked into the file system and file OAuth2TokenBuilder.php is present under the directory "src/Google/AdsApi/Common" . Please let me know how we can fix this issue? Thanks, Sarvagya -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/4909235f-c31c-431d-8e7e-63b285725343%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.