Hi Ahmed,
Thank you for reaching out. Please find my response to your questions below:
The user has to send the client customer id. It could not be retrieved via the developer token or refresh token.
This linking process could be done by authenticating as the manager account and client customer account and following this flow.
Thanks and regards,
Xiaoming, Google Ads API Team
|
||||||

Credential credential = new OfflineCredentials.Builder()
.forApi(OfflineCredentials.Api.ADWORDS)
.withClientSecrets(OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET)
.withRefreshToken(REFRESH_TOKEN)
.build()
.generateCredential();
AdWordsSession session =
new AdWordsSession.Builder()
.withDeveloperToken(DEVELOPER_TOKEN)
.withOAuth2Credential(credential).build();
AdWordsServicesInterface adWordsServices = AdWordsServices.getInstance();
CustomerServiceInterface customerServiceInterface = adWordsServices.get(session, CustomerServiceInterface.class);
Customer[] customers = customerServiceInterface.getCustomers();
for (int i = 0; i < customers.length; i++) {
Customer c = customers[i];
System.out.println("customer Id: " +c.getCustomerId());
System.out.println("customer name : " +c.getDescriptiveName());
System.out.println(" ===================== ");
}