开发者

Can I create a Google account programmatically?

开发者 https://www.devze.com 2022-12-28 10:56 出处:网络
Does anybody know if via the google api in java 开发者_如何学编程I can create google accounts programmatically. Yes

Does anybody know if via the google api in java 开发者_如何学编程I can create google accounts programmatically.


Yes

(ish)

The Admin SDK Directory API allows you to create accounts which work with Google tools (Gmail, Calendar, etc.) but are not @gmail.com / @googlemail.com accounts.

This is used by companies to automate creation of accounts for online google tools when new users are added to networks and similar scenarios.

User management is documented here.

This replaces the provisioning API which was deprecated in 2013.


NO

The only possible way to do this would be to use a web automation framework. Python is great for web automation using tools such as mechanize. I've never done it in Java, but you should do a google search for java programmatic web browser or java web automation.

On top of that you would have to incorporate an OCR package to beat the captcha.

There is a reason that google, nor anyone else, allows the programmatic creation of accounts. Spammers would have a field day. Within days there would be no valid accounts left for any new users to use. In short, it would be a disaster.


As others have pointed out, you cannot create Google consumer accounts (ie, @gmail accounts) via any sort of API. It would create a field day for Spammers. To make it difficult for Spammers, Google uses tactics such as CAPTCHAs to prevent abuse.

But, you can create Google Apps accounts via their Provisioning APIs. A Google Apps account is basically a white labeled version of Google Apps (Gmail, Calendar, Docs, etc) that is under your own domain name.

For the same Spam concerns, your Google Apps account would have to be either a Premier domain (where you pay for every account you provision) or an Educational institution (I assume some sort of verification process for that). So, since you have to pay for each account, it's not a huge risk for spammers (unless they want to pay big $$$ for each account.. very unlikely).


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)


The real answer is YES.

The fact is that we don't know (yet) how.

The proof is that an account can be created from any android device without any captcha, without a phone number and without an email.

So the secret is inside android codebase.


MAYBE?

I am going to write an answer that has not been written so far, but which could actually break the EULA (if that's the case, can someone point out the specific paragraph of it that prevents this?).

The solution is: redirect Google's CAPTCHA to your user.

Assuming your software has a user, you could present them Google's captcha so the account is created by them, for your system, without them knowing.

Would this work for you?


You can do that theoretically, but Google's account creation - like other services - uses image recognition for confirmation that you're a user (aka CAPTCHA) and you need to be able to write image recognition program that can do that.

AFAIK there's no programmatic API from Google to create accounts, since doing so would open them up to spammers/scammers/etc... which the CAPTCA was meant to prevent.

Why would you do that? I am not sure Google allows that in the first place as far as EULA.


I am going to assume that you aren't telling us your use case which is really to have a convenient way to use google logins on your site (because that's the closest you'll get and be legit). I would check out using OpenID in the same way SO does.


Actually, you can create if by google account you mean your own domain (those business ones using google). You can check it here


YES...

Actually you can do that. You can write CUrl scripts and can use different APIs available to break the captcha. Breaking a captcha is key thing here.


The fact that Google's account creation UI requires a CAPTCHA is your first hint that the answer is NO.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号