I have a Google AdWords manager account to manage our user's ads account in my platform.
The user needs to give me the customer id(ads account) if they want to authorize me.
I can invite any customer id for linked when I use the refresh_token which get from connecting my google account.
but, if the user uses the refresh_token which get from connecting their Google account, it will get
USER_PERMISSION_DENIED
.
my question is
is it only the refresh_token from manager account can invite someone by the AdWords API?
so, what the refresh_token from the user/manager can do?
node-adwords this is the library what I use.
-------- 11/12 updated --------
let user = new AdwordsUser({
"client_id": "xxxxxxxxxxx.apps.googleusercontent.com",
"client_secret": "xxxxxxxxxxx",
"developerToken": "xxxxxxxxxx",
"userAgent": "xxxx",
"clientCustomerId": "mcc-account id",
"debug": "true"
});
// linked customer.
user.credentials.refresh_token = 'refreshToken' (user's or mcc-account's?)
const managedCustomerService = user.getService('ManagedCustomerService', apiVersion);
const managerCustomerId = +user.credentials.clientCustomerId.split('-').join('');
const clientCustomerId = +clientId.split('-').join('');
const operation = {
operator: 'ADD',
operand: {
managerCustomerId,
clientCustomerId,
linkStatus: 'PENDING',
pendingDescriptiveName: 'invitation',
isHidden: false,
}
}
managedCustomerService.mutateLink({operations: [operation]}, (error, result)....