views:

374

answers:

7

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

+1  A: 

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.

DVK
+1  A: 

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

Dolph
+5  A: 

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.

kurige
Last time I created a google account, I actually had to call a phone number to verify my humanity. I don't think you could automate something like that very easily.
Juliet
+1  A: 

There is also an email confirmation required.

Romain Hippeau
A: 

Ask Google - if you give them money I'm pretty sure they will allow you quite a lot.

Thorbjørn Ravn Andersen
+1  A: 

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).

Andy S
A: 

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.

Adam