Hey Ray Tsang, Many thanks for the reply.
Now looking at the links you have provided to me it was a little difficult
for me to convert the code snippet(provided in java) to PHP but some how i
have managed to create a function described below.
function LinkExistingAdwordsAccoount(AdWordsUser $user) {
$managedCustomerService = $user->GetService('ManagedCustomerService',
ADWORDS_VERSION);
$customer = new ManagedCustomerLink();
$customer->managerCustomerId = "XXXX499577";
//$customer->clientCustomerId = "XXXX313836";
$customer->clientCustomerId = "2823209189";
$customer->linkStatus = "PENDING";
//$customer->pendingDescriptiveName = "";
// Create operation.
$operation = new LinkOperation();
$operation->operator = 'ADD';
$operation->operand = $customer;
//$operation->OperationType = $OperationType;
$operations = array($operation);
echo "<pre>";
print_r($operations);
// Make the mutate request.
$result = $managedCustomerService->mutateLink($operations);
print_r($result);
}
The following was the result:
Array
(
[0] => LinkOperation Object
(
[operand] => ManagedCustomerLink Object
(
[managerCustomerId] => XXXX499577
[clientCustomerId] => XXXX209189
[linkStatus] => PENDING
[pendingDescriptiveName] =>
)
[operator] => ADD
[OperationType] =>
[_parameterMap:Operation:private] => Array
(
[Operation.Type] => OperationType
)
)
)
MutateLinkResults Object
(
[links] => Array
(
[0] => ManagedCustomerLink Object
(
[managerCustomerId] => XXXX499577
[clientCustomerId] => XXXX209189
[linkStatus] => PENDING
[pendingDescriptiveName] =>
)
)
)
Now This was a successful request because i have checked it by hitting
twice and i got the following result
Array
(
[0] => LinkOperation Object
(
[operand] => ManagedCustomerLink Object
(
[managerCustomerId] => XXXX499577
[clientCustomerId] => XXXX209189
[linkStatus] => PENDING
[pendingDescriptiveName] =>
)
[operator] => ADD
[OperationType] =>
[_parameterMap:Operation:private] => Array
(
[Operation.Type] => OperationType
)
)
)
An error has occurred:
[ManagedCustomerServiceError.ALREADY_INVITED_BY_THIS_MANAGER @ operations[0]]
Now looking at the response i am assuming that the request has been gone to
the required reciver BUT when loging in with the clientCustomerId
credentials i did not found any email for the invitation.
Is anything Wrong here?? Please guide me.
Again many thanks for the reply.
Thanks!
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
For more options, visit https://groups.google.com/groups/opt_out.