Hi, 
Getting following error when sending invitation from Manager's account 
through python API. 











*Fault: errors {  error_code {    manager_link_error: INVALID_CHANGE  }  
message: "The change for mutate link is invalid."  location {    
field_path_elements {      field_name: "operation"    }  }}*
Tried with multiple client ids, still the same error. If i invite them 
through UI, it works.
I am using the same code provided as a sample. It's not working. Seems to 
be a problem with the API. Got stuck with issue. Tried multiple ways. Will 
appreciate your help. 
Below is the code to invite. 

def main(
client: GoogleAdsClient,
customer_id: str,
manager_customer_id: str,
delete_existing: bool = False,
) -> None:

# 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

try:
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."
)
except GoogleAdsException as ex:
print(f"❌ Failed to create invitation:")
print(f" Request ID: {ex.request_id}")
print(f" Status: {ex.error.code().name}")
for error in ex.failure.errors:
print(f" Error: {error.message}")
if error.location:
for field_path_element in error.location.field_path_elements:
print(f" On field: {field_path_element.field_name}")
raise 


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/092fdd3d-d679-4c6d-ad0f-6fd937d275dan%40googlegroups.com.

Reply via email to