Thanks for the links,
I create a helper function as you can see below that invites a client to
link the account to MMC. However, i'm getting
'ManagedCustomerServiceError.NOT_AUTHORIZED'. If I remove the
SetCLientCustomerId, I receive
'AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED'.
The variables below are:
- CIENT_ID: Application Client Id;
- CLIENT_SECRET: Application Client Secrete;
- refresh_token: Client Customer refresh token got in oauth steps;
- DEVELOPER_TOKEN: Application Developer token;
- customer_id: Client customer id (correctly got in oath2 steps + api
method);
- MANAGER_ID: MCC Id;
def invite_account(customer_id, refresh_token):
oauth2_client = oauth2.GoogleRefreshTokenClient(CLIENT_ID, CLIENT_SECRET,
refresh_token)
adwords_client = adwords.AdWordsClient(DEVELOPER_TOKEN, oauth2_client)
adwords_client.SetClientCustomerId(customer_id)
managed_customer_service = adwords_client.GetService(
'ManagedCustomerService',
version='v201709')
operation = {
'operator': 'ADD',
'operand': {
'managerCustomerId': MANAGER_ID,
'clientCustomerId': customer_id,
'linkStatus': 'PENDING',
'pendingDescriptiveName': 'Pareto Quantic is inviting yout account',
'isHidden': False
}
}
Em sexta-feira, 25 de agosto de 2017 14:59:25 UTC-3, Shwetha Vastrad
(AdWords API Team) escreveu:
>
> Hi,
>
> While there isn't a consolidated tutorial in Python, you can follow the
> getting
> started guide <https://github.com/googleads/googleads-python-lib> in the
> library's repository which shows how to set up the AdWords API Python
> library. The wiki page
> <https://github.com/googleads/googleads-python-lib/wiki> lists some
> useful resources as well.
>
> Regards,
> Shwetha, AdWords API Team.
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 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/a739923c-140d-4241-b25a-018c6e56ad7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.