INVAID CHANGE : Sending invitation to client from manager account

8 views
Skip to first unread message

Subhasis Padhy

unread,
2:01 AM (11 hours ago) 2:01 AM
to Google Ads API and AdWords API Forum
While sending invitation manager account to client account getting following error

The change for mutate link is invalid
Request  failed with status "INVALID_ARGUMENT" and includes the following errors:
        Error with message "The change for mutate link is invalid.".
                On field: operation

Code is same as the official documentation. 

I have also tried to send invitation manually between accounts. It is sending. 
Its just google Ads api failing. 

def main(
client: GoogleAdsClient, customer_id: str, manager_customer_id: str
) -> None:
# This example assumes that the same credentials will work for both
# customers, but that may not be the case. If you need to use different
# credentials for each customer, then you may either update the client
# configuration or instantiate two clients, where at least one points to
# a specific configuration file so that both clients don't read the same
# file located in the $HOME dir.
customer_client_link_service: CustomerClientLinkServiceClient = (
client.get_service("CustomerClientLinkService")
)

# Extend an invitation to the client while authenticating as the manager.
client_link_operation: CustomerClientLinkOperation = client.get_type(
"CustomerClientLinkOperation"
)
client_link: CustomerClientLink = client_link_operation.create
client_link.client_customer = customer_client_link_service.customer_path(
customer_id
)
# client_link.status expects an enum value (int)
client_link.status = client.enums.ManagerLinkStatusEnum.PENDING.value

response: MutateCustomerClientLinkResponse = (
customer_client_link_service.mutate_customer_client_link(
customer_id=manager_customer_id, operation=client_link_operation
)
)
resource_name: str = response.results[0].resource_name

print(
f'Extended an invitation from customer "{manager_customer_id}" to '
f'customer "{customer_id}" with client link resource_name '
f'"{resource_name}"'
)

print("✅ Invitation sent successfully! Client should see the invitation in their Google Ads interface.")
# [END link_manager_to_client]
Reply all
Reply to author
Forward
0 new messages