Hello Ludovic,
Thanks for your patience, I was able to expand the invitation to the client
from my manager account using customerClientLinkService in Java. At this
point I was only able to provide you the entire snippet in Java, apologies
for that. While creating the customerCleintLink, you have to give the
resource name of the client account you want to link and the status of the
ManagerLinkStatus should be in PENDING status, if you are expanding the
invitation. These two fields are mandatory. You could try the similar steps
in PHP to perform mutate call to customerClientLinkService. Our team is
aware that the code samples are not yet available for
customerClientLinkService,
we will update them soon. Please let me know if you have any further
questions.
Code Snippet Below in Java to expand the invitation to the client account
from the manager account:
private void runExample(
GoogleAdsClient googleAdsClient, long customerId) {
try (CustomerClientLinkServiceClient
customerClientLinkServiceClient = googleAdsClient.
getCustomerClientLinkServiceClient())
{
//creatign 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());
}
}
Regards,
Sai Teja, Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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/00d12jcj1800000189sc48001ceab4z70mj8cpl6co30c1g68q3ie9p%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.