Revoking invitations

52 views
Skip to first unread message

MWA

unread,
Jun 22, 2020, 9:49:07 AM6/22/20
to AdWords API and Google Ads API Forum
Hi,

I want to revoke the invitation via API. My code is

$oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();


$session 
= (new AdWordsSessionBuilder())->fromFile()->withOAuth2Credential($oAuth2Credential)->build();


$adWordsServices
=new AdWordsServices();


$managedCustomerService 
= $adWordsServices->get($session, ManagedCustomerService::class);


$link 
= new ManagedCustomerLink();    
$link
->setClientCustomerId($customerid);
$link
->setLinkStatus(LinkStatus::CANCELLED);
$link
->setManagerCustomerId(ADWORDS_MANAGER_ID);


$linkop 
= new LinkOperation();
$linkop
->setOperand($link);
$linkop
->setOperator(Operator::SET);    


$operations 
= array($linkop);


try{
 $result 
= $managedCustomerService->mutateLink($operations);
 print_r
($result);
}catch(ApiException $e){
 print_r
($e->getErrors());
}

But I'm receiving error.


Array
(
    
[0] => Google\AdsApi\AdWords\v201809\mcm\ManagedCustomerServiceError Object
        
(
            
[reason:protected] => NO_PENDING_INVITATION
            
[customerIds:protected] =>
            
[fieldPath:protected] => operations[0]
            
[fieldPathElements:protected] => Array
                
(
                    
[0] => Google\AdsApi\AdWords\v201809\cm\FieldPathElement Object
                        
(
                            
[field:protected] => operations
                            
[index:protected] => 0
                        
)


                
)


            
[trigger:protected] =>
            
[errorString:protected] => ManagedCustomerServiceError.NO_PENDING_INVITATION
            
[ApiErrorType:protected] => ManagedCustomerServiceError
            
[parameterMap:Google\AdsApi\AdWords\v201809\cm\ApiError:private] => Array
                
(
                    
[ApiError.Type] => ApiErrorType
                
)


        
)


)

And I'm sure there is pending link request which I can see in Sub-account settings.

Google Ads API Forum Advisor Prod

unread,
Jun 22, 2020, 1:48:07 PM6/22/20
to itswasi...@gmail.com, adwor...@googlegroups.com
Hello,

Please share your SOAP request and response and a screenshot that shows a pending invitation through reply privately to author so I can take a closer look.

Thanks,
Anthony
Google Ads API Team

ref:_00D1U1174p._5004Q218MRn:ref

MWA

unread,
Jul 2, 2020, 7:42:02 AM7/2/20
to AdWords API and Google Ads API Forum
Found the problem,

API is working fine, but on web interface request takes an hour or so to disappear the request, when I request again then NO_PENDING_INVITATION error occurs because the request was fulfilled first time only request doesn't go way on website, it would be great help if you look into this and remove the request from web interface ASAP too.

Thanks.

Google Ads API Forum Advisor Prod

unread,
Jul 6, 2020, 10:09:01 AM7/6/20
to itswasi...@gmail.com, adwor...@googlegroups.com
Hi,

Issues such as these are out of scope for my team. You will need to reach out to the product team by navigating to this link.

Regards,
Reply all
Reply to author
Forward
0 new messages