Hello Jakub,
For the AdWords API
<https://developers.google.com/adwords/api/docs/reference/release-notes/v201809>
the
client libraries are available here
<https://developers.google.com/adwords/api/docs/clientlibraries> and for
the Google Ads API
<https://developers.google.com/google-ads/api/docs/release-notes> the
client libraries available here
<https://developers.google.com/google-ads/api/docs/client-libs>. Using
AdWords API you can try the ManagedCustomerService
<https://developers.google.com/adwords/api/docs/reference/v201809/ManagedCustomerService#mutatelink>
and
can refer the Linking accounts section of this guide
<https://developers.google.com/adwords/api/docs/guides/accounts-overview#managedcustomerservice>
for
more information about the ManagedCustomerService.
If you are using the Google Ads API, you should use
CustomerClientLinkService.MutateCustomerClientLink
<https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.services#google.ads.googleads.v1.services.CustomerClientLinkService>
service.
Below is the code sample to extend the invitation to the client account in
Java. Since the examples are not available in out client libraries I can
provide sample in Java only at this point of time. You can try the similar
steps in PHP to extend the invitation. Likewise you have to update the
ManagerLinkStatus to ACTIVE from the client account to accept the
invitation.
Code Snippet Below in Java to extend the invitation to the client account
from the manager account:
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());
}
}
Please elaborate if you have any further questions.
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/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
On 03/20/19 07:13:19 [email protected] wrote:
Hi Everyone !
I am facing the same problem with Ads Api.
I have created new account X under My manager account Y.
I would like to link random new user with ads account Z to my newly created
account X.
But that way I should be able to manage account X as manager and also user
will see this account X under his manager account Z.
is it possible?
Do somebody know the code in PHP for that operation?
Also what library should I use the AdWords Api or Ads Api ?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/72a06e46-9670-4825-af62-c8633b1ddb15%40googlegroups.com
<https://groups.google.com/d/msgid/adwords-api/72a06e46-9670-4825-af62-c8633b1ddb15%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/186ug4o000000001ge0j0g000m196gz70mj8cpl6co30c1g68q3ie9p%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.