Can I create a Google account programmatically?

前端 未结 11 815
栀梦
栀梦 2020-12-05 02:49

Does anybody know if via the google api in java I can create google accounts programmatically.

11条回答
  •  遥遥无期
    2020-12-05 03:35

    It depends on your definition of create account...

    it is possible to create an account inside a google group, or domain. By using the code below you can create accounts for your google group/domain. For this scenario YES you CAN create a google account.

    However, if you want to create a google account as in @gmail.com... I really have not found a way to do it programatically.

    Here is the link of where to download the google api, and the Documentation. https://developers.google.com/google-apps/provisioning/#creating_a_user_account

    Good Luck.

    import sample.appsforyourdomain.AppsForYourDomainClient;
    
    AppsForYourDomainClient client = new AppsForYourDomainClient(email, password, domain);
    client.createUser(String username, String givenName, String familyName, String password)
    

提交回复
热议问题