Hi,

I have enabled logging from the guide. I am sending you the updated code
and the logs. There are no errors or warnings. The request code is 200.

Here is my updated code.

public function listPendingYoutubeLinkInvitations($customerId)
    {
        $googleAdsServiceClient = $this->client->
getGoogleAdsServiceClient();
        $query = 'SELECT product_link_invitation.resource_name FROM
product_link_invitation';

        $logger = $this->client->getLogger();
        $logger->info("Executing query: $query for customer ID: $customerId"
);

        $response = $googleAdsServiceClient->
search(SearchGoogleAdsRequest::build($customerId, $query));

        $logger->info('Response: ' . json_encode($response));

        $invitations = [];
        foreach ($response->iterateAllElements() as $row) {
            $invitationResourceName = $row->getProductLinkInvitation()->
getResourceName();
            $invitations[] = [
                'resource_name' => $invitationResourceName,
            ];
        }

        $logger->info('Query executed successfully, invitations fetched.',
$invitations);

        return $invitations;
    }



Here is my log output
[2024-05-22T14:41:07.675860+00:00] google-ads-logger.INFO: Google Ads
Service logger initialized. [] []
[2024-05-22T14:41:08.419727+00:00] google-ads-logger.INFO: Executing query:
SELECT product_link_invitation.resource_name FROM product_link_invitation
for customer ID: 8166733962 [] []
[2024-05-22T14:41:12.181379+00:00] google-ads-logger.INFO: Response: {} []
[]
[2024-05-22T14:41:12.182676+00:00] google-ads-logger.INFO: Query executed
successfully, invitations fetched. [] []

On Wed, May 22, 2024 at 11:22 AM Google Ads API Forum Advisor
<adsapi@forumsupport.google> wrote:

> Hi,
>
> In order to assist you further, kindly provide us with the complete API
> logs (request
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#request>
>  and response
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#response>
>  with request-id
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id>
>  and request header
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>)
> generated at your end while you are receiving an empty array when fetching
> the pending invitations.
>
> Since you are using the PHP client library, if you haven't enabled logging
> yet, I would request you to enable it by referring to this guide PHP
> <https://developers.google.com/google-ads/api/docs/client-libs/php/logging>
> .
>
>
> This message is in relation to case
> "ref:!00D1U01174p.!5004Q02tJ292:ref" (ADR-00235756)
>
> Thanks,
>
> [image: Google Logo] Google Ads API Team
>
>
>

-- 
Thanks & Regards,
Ansh Ved
+91 8898898131
https://anshved.github.io

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/CA%2BBLo0uXbsCisv35G7SSNPeHSqDu-%3DxKYkZmdihoXjdiNS-3Ew%40mail.gmail.com.
  • Go... Ansh Ved
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Ansh Ved
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
          • ... Ansh Ved
            • ... Ansh Ved
              • ... Ansh Ved
                • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
                • ... Ansh Ved
                • ... Ansh Ved
                • ... Ansh Ved
                • ... Ansh Ved
                • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to