Hello Ludoviс,
can you me help? I'm trying to use your code to link Adwords accounts,  but 
in the code section with  
$customerClientLink = new CustomerClientLink([
"client_customer" => new StringValue(['value' => $customerId]),
"status"   => ManagerLinkStatus::PENDING
]);

I get 500 error from server.  I think the problem is with new 
CustomerClientLink. 
Could you please show this section of your code?

require __DIR__ . '/vendor/autoload.php';

use GetOpt\GetOpt;
use Google\Auth\CredentialsLoader;
use Google\Auth\OAuth2;
use Psr\Http\Message\ServerRequestInterface;
use React\EventLoop\Factory;
use React\Http\Response;
use React\Http\Server;
use UnexpectedValueException;

use Google\Ads\GoogleAds\Examples\Utils\ArgumentNames;
use Google\Ads\GoogleAds\Examples\Utils\ArgumentParser;
use Google\Ads\GoogleAds\Lib\V1\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V1\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V1\GoogleAdsException;
use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;
use Google\Ads\GoogleAds\V1\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V1\Services\GoogleAdsRow;
use Google\ApiCore\ApiException;
use Google\Ads\GoogleAds\V1\Resources\Customer;
use Google\Ads\GoogleAds\V1\Resources\CustomerManagerLink;



среда, 6 марта 2019 г., 17:01:10 UTC+1 пользователь ludovic...@gmail.com 
написал:
>
> Yes ! It's ok to generate the manager_link_id to ask one customer to link 
> his account to the manager.
> So now, i try to do the last action "accept the request".
> I think i'm ok with my code, but when i try to do the change in cURL, they 
> told me about this : "FIELD_MASK_MISSING".
>
> This i my code below.
>
> $customerManagerLinkServiceClient = 
> $sessionCustomer->getCustomerManagerLinkServiceClient();
> $customerManagerLink = new CustomerManagerLink([
>     "resource_name" => new StringValue(['value' => 
> 'customers/1xxxxxxx1/customerClientLinks/1xxxxxx1_1xxxxxxx1']),
>
>     "manager_customer" => new StringValue(['value' => 'customers/1xxxxxxx1']),
>     "manager_link_id" => new Int64Value(['value' => 1xxxxxxx1]),
>     "status" => 2
> ]);
>
> $operationM = new CustomerManagerLinkOperation();
> $operationM->setUpdate($customerManagerLink);
>
> $responseM = 
> $customerManagerLinkServiceClient->mutateCustomerManagerLink(2xxxxxxx2, 
> [$operationM]);
> $result = $responseM->getResults();
>
>
> Cheers.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/92d7d3b2-50f5-4dba-979f-6edd94c4f27c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Re: [PH... ludovic . web2roi
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
  • Re: [PH... ludovic . web2roi
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
  • Re: [PH... ludovic . web2roi
  • Re: [PH... ludovic . web2roi
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
  • Re: [PH... ludovic . web2roi
  • Re: [PH... ludovic . web2roi
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
    • Re... Непомнющий Александр
      • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
  • Re: [PH... Kuba Dev
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
      • ... Van Vu
        • ... Kuba Dev
          • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
            • ... Van Vu
              • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to