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!