Hi Yasar,

the new API code is working fine, my question is:

$response = 
$campaignCriterionServiceClient->mutateCampaignCriteria($google_ads_customerid, 
$operations);
$results = $response->getResults()[0]->getResourceName();

returns the following string: 
"customers/123456789/campaignCriteria/1122334455~987654321"

but wondering if it's possible to get the criterion_id from the API .

Currently exploding the getResourceName string to get the criterion_id 
which is the last part after the ~
$google_ads_resource = $response->getResults()[0]->getResourceName();
       - "customers/123456789/campaignCriteria/1122334455~987654321"
$google_ads_resource_explode = explode('~', $google_ads_resource); 
$criterion_id = $google_ads_resource_explode[1];
- "987654321"


on the old adwords API I used as:
$criterion_id = $campaignCriterion->getCriterion()->getId();
old API also returned the IP address as :
$campaignCriterion->getCriterion()->getipAddress();

Thanks,
Andras

On Wednesday, January 19, 2022 at 7:33:19 PM UTC-8 adsapi wrote:

> Hi Andras,
>
> Thanks for reaching out to the Google Ads API Support.
>
> Could you provide us with the complete *request* 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service?hl=en#request>
>  
> and *response* 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service?hl=en#response>
>  
> logs with the *request-id* 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure?hl=en#request-id>,
>  
> so our team can better check?
>
> For the PHP client library, logging can be enabled by navigating to the 
> Client libraries > Your client library (Select PHP) > Logging 
> documentation, which you can access from this *link* 
> <https://developers.google.com/google-ads/api/docs/client-libs>. You may 
> then send the requested information via the *Reply privately to author* 
> option. If this option is not available, you may send the details directly 
> to our googleadsa...@google.com alias instead.
>
> Regards, 
> [image: Google Logo] 
> Yasar 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2VNWVr:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d4c1574e-2349-40ee-9fc4-1b331da837ddn%40googlegroups.com.
  • Ca... Andras Kende
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Andras Kende
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
          • ... Andras Kende
            • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to