how to link Client account to MCC account using Adwords api?

954 views
Skip to first unread message

n

unread,
Aug 29, 2017, 6:36:05 AM8/29/17
to AdWords API Forum
Hi,

        I have MCC accounts. and I have more than one client account. which is not linked my MCC account.
        Now i want to linked those client account to my MCC account using by Adwords api.
        But, i don't know how to link account using api?
        please give me any suggestion.

Thanks.

Bharani Cherukuri (AdWords API Team)

unread,
Aug 29, 2017, 11:31:08 AM8/29/17
to AdWords API Forum
Hello, 

You could use the ManagedCustomerService to manage the links between the manager account and client account to make requests on behalf of client accounts. You can refer to this documentation which explains in detail on how to extend an invitation to the client account and how the client accepts the invitation. The ManagedCustomerService.mutateLink allows you to invite a client account and ManagedCustomerService.getPendingInvitations lets you see all the pending invitations that have been accepted or declined. You can refer to our code sample in Java available here. You can also refer to the code samples in other languages here.

Thanks,
Bharani, AdWords API Team.  

n

unread,
Aug 30, 2017, 7:21:41 AM8/30/17
to AdWords API Forum
hi,

Thanks, But I have only client login detail (like email and password) but don't know client id so how to link client account to my MCC account only using client account email or password. 

Otherwise please suggest me how to get Client ID using their login detail using AdWords  API in PHP which is already linked or not linked, to my MCC account.

Thanks.

Bharani Cherukuri (AdWords API Team)

unread,
Aug 30, 2017, 2:56:59 PM8/30/17
to AdWords API Forum
Hello,

The client Customer ID is the account number of the AdWords client account that you may want to manage through the API. You could get the client Customer ID by logging into your AdWords account. To extend an invitation to the client account you will need the MANAGER_ID which is the Manager Customer ID and CLIENT_ID which is the Client Customer ID. Please refer to this documentation for more information.

Thanks,
Bharani, AdWords API Team.

On Tuesday, August 29, 2017 at 6:36:05 AM UTC-4, n wrote:

n

unread,
Aug 31, 2017, 12:21:24 AM8/31/17
to AdWords API Forum
Hi,

Thanks, But I want to get Client Customer ID without login in AdWords account i.e using calling any AdWords API I want to fetch ID dynamically so I  stored into my database and, after using that ID I want to get the report.

When I log in using client login detail in my Web system, I want to get this client's Adword account report so, I need client customer id dynamically(Without login in Adwords Account) Using Any Adwords API. Can I implement this ???

Thanks.

Bharani Cherukuri (AdWords API Team)

unread,
Aug 31, 2017, 11:47:13 AM8/31/17
to AdWords API Forum
Hi Vaibhav, 

You need to generate the OAuth2 credentials for the client account by following the instructions provided here. Once you have these OAuth2 credentials, you can use CustomerService.getCustomers(), without setting the clientCustomerId header, to retrieve the AdWords account directly accessible by the authenticated user. This way, using the client's OAuth2 credentials, you can get the clientCustomerId programmatically. You can then issue an invitation to the client account from your manager account and accept the invitation from the client account as I described earlier. You should ensure that you use your MCC's OAuth2 credentials when you extend the invitation and the client account's OAuth2 credentials when you accept the invitation.

Regards,
Bharani Cherukuri
AdWords API Team

On Tuesday, August 29, 2017 at 6:36:05 AM UTC-4, n wrote:
Reply all
Reply to author
Forward
0 new messages