I do the following in a java application to authenticate my client and multi-client.
AppsForYourDomainClient client = null;
ProvisioningApiMultiDomainSampleClient multiClient = null;
try {
client = new AppsForYourDomainClient("[email protected]", "password", "email.com");
multiClient = new ProvisioningApiMultiDomainSampleClient("[email protected]", "password", "email.com","multidomain-api-sample-email.com");
} catch (Exception ex) {
ex.printStackTrace();
}
I want to switch to OAuth 2 authentication. Also AppsForYourDomainClient and ProvisioningApiMultiDomainSampleClient are being deprecated. How do I move forward with authenticating with OAuth2 and the new Google Directory API?
What I was needing was examples. There seems to be plenty of documentation but very little example.
Luckily I found this: Create gmail account for a domain using Google Admin SDK Directory API in Java
Which points me in the right direction. And I hope if this post comes up on any searches, then they can refer to the link above.
Thanks