Hi,
I am trying to use the Google AdWords API to accept invitations sent from 
the YouTube Account. 

I have already set up the connection. Using the PHP library for V16: 
https://github.com/googleads/google-ads-php/

I am using this with Laravel

I sent a get request to get the list of product invitation links, but I am 
receiving an empty array. I could successfully fetch campaigns from Google 
ads.

/////////////////// This works well /////////////
public function getAllCampaigns($customerId) 
    {
        $googleAdsServiceClient = 
$this->client->getGoogleAdsServiceClient();
        $query = '
        SELECT campaign.id, campaign.name FROM campaign ORDER BY campaign.id
        ';

        $stream = $googleAdsServiceClient->searchStream(
            SearchGoogleAdsStreamRequest::build($customerId, $query)
        );

        $allCampaigns = [];
        foreach ($stream->iterateAllElements() as $row) {
            $allCampaigns[] = [
                'campaign_id' => $row->getCampaign()->getId(),
                'campaign_name' => $row->getCampaign()->getName()
            ];
        }

        return $allCampaigns; 
    } ///////////////// This does not work /////////////////
public function listPendingYoutubeLinkInvitations($customerId)
    {
        $googleAdsServiceClient = $this->client->
getGoogleAdsServiceClient();
        $query = '
        SELECT product_link_invitation.status, 
product_link_invitation.type, 
product_link_invitation.product_link_invitation_id, 
product_link_invitation.resource_name FROM product_link_invitation
        ';

        $stream = $googleAdsServiceClient->searchStream(
            SearchGoogleAdsStreamRequest::build($customerId, $query)
        );

        $invitations = [];
        foreach ($stream->iterateAllElements() as $row) {
            $invitations[] = $row->getProductLink();
        }

        return $invitations;
    }

I have also tried listing customer_client_invitation and customer_invitation
Everything just gives me an empty array [].


Can someone help me with this ??
Am I missing something?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/f3694ea8-7db2-4152-9b5e-f79eaa8eff6en%40googlegroups.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

Reply via email to