Hi Andy,
Thank you for writing to us regarding your concern. I understand you are looking to use CustomerClientLinkService to extend an invitation to a client account to link it to the manager account. Please find below the code snippet in Java to extend the invitation to the client account. Since the examples are not available in our client libraries I can provide samples in Java only at this point of time. Please try the similar steps in the client libraries of your requirement to extend the invitation. If you are still facing any issue, please share the complete request and response logs along with the client customer id against which you are making the API call in private message for me to investigate this further on my end.
private void runExample(
GoogleAdsClient googleAdsClient, long customerId) {
try (CustomerClientLinkServiceClient customerClientLinkServiceClient = googleAdsClient.getCustomerClientLinkServiceClient())
{
//Creating resource name for customer
String customerResourceName = ResourceNames.customer(123456789L);//the client account to which you are expanding the invitation.
//Creating customerClientLink object
CustomerClientLink customerClientLink = CustomerClientLink.newBuilder()
.setClientCustomer(StringValue.of(customerResourceName))
.setStatus(ManagerLinkStatus.PENDING)
.build();
//Creating operation for the mutate request
CustomerClientLinkOperation operation = CustomerClientLinkOperation.newBuilder()
.setCreate(customerClientLink)
.build();
// Send the operation in a mutate request.
MutateCustomerClientLinkResponse response =
customerClientLinkServiceClient.mutateCustomerClientLink("18xxxxxx17", operation); // Your manager account Id should be placed in the mutate call.
// Print the resource name of each updated object.
System.out.println(response.getResult());
}
}
P.S. Please use Reply privately to author option while sharing the details.
Regards,
Nikisha Patel, Google Ads API Team