Can I create a Google account programmatically? - java

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.

Related

Facebook Signin in a mobile App (backed by a REST API)

I have done some researching but I haven't find a clean explanation of how it all work.
I would like to know how does applicationa like Instagram, Wordcrack (online game), AirBnb and many other app have tier "Login with Facebook" done?
I currently work on the Java REST services that backups up an iOS app.
If some one already has done a similar things in their app/server I would really appreciate some help
I'm not looking for ready to use code answer but more of a general idea of the architecture to achieve this.
thank you!
I've done it in JavaScript, but the principle will surely be the same.
You have an API, provided by facebook. There are some information there :
https://developers.facebook.com/docs/apis-and-sdks#third-party-sdks
And, more than that, you have declare your own app on facebook. This has, for me, 2 goals :
provide the url of your server, so when you'll call facebook with the
login information, he will know where to redirect
specify the access your app need.
When i've begun to watch this, i've discovered satellizer. I think that's a good entry point to understand how it works with an example :
https://github.com/sahat/satellizer
Hope this help.
Supporting login through their website (Facebook,Twitter,Instagram etc) allows a user to use his already active profile to signup to a portal or an app. This way a user experience is enhanced and having to have separate login credentials for different apps and sites are reduced.
A developer utilizes the APIs or SDKs that these social networks expose to let you integrate it in your app and provide an easy sign up process to your users.

creating a custom user database in GAE Java

This is my first time attempting to make a custom user database. I am trying to make a customer user database in Java in the google app engine - I understand that GAE offers a user openID service, however, this does not work for this application.
Can anyone point me in the direction of somewhere or give me the basics behind designing a custom user database for Java in GAE, how to check people are logged in etc etc? Or any other useful places that will help me on my quest.
Cheers
You can look at this boilerplate for inspiration:
https://github.com/davps/Spring3-GAE-boilerplate
That said, you don't need to use OpenID with Google's user service. See the available authentication options here:
https://developers.google.com/appengine/docs/java/users/#Java_Authentication_options

Struts2 Login/Register with facebook

I've recently found an open source library that does, post on a users facebook wall(restfb and facebook4j)
All of them does the necessary things, but there's one thing left I need to do and that is to login and register users to my web application using their facebook account. are there any related frameworks for such task? if not, please provide alternative solutions
If i am correct in my understanding, all you want is to use Oauth or Open Id system to let user register and login to your website using Facebook or any other such service provider.
If i am correct in my understanding, there is a very good library which is quite easy to use and very light weight.
Scribe-Java
It also contains few examples which shows how to use it and how it works, let us know if this is what you are looking.

Socially Connected

I have received a requirement to develop a feature to check if 2 email id's, logins or identities are socially connected. I hope to ask 2 users their facebook id, linkedin id (and in future may be more social networks). I then hope to use their facebook id's connect to facebook api's and determine if
Are these two connected socially, are they friends ?
Are these 2 connected through mutual friends
Do they have n levels of mutually connected friends ? (like in linkedin)
Similarly I hope to use linkedin api's to identify if they are socially connected and if not, how far they are.
My question is
I have been in a social project before and understand that facebook and linked in provide a lot of restrictions on their api's. Do you know of any that stand out very obviously from I need them to do for me ?
Are there any privacy/legal issues that I need to be aware of, in these scenarios. Will there be a issue if I were to let each of the users know that they are x networks away from each other ?
Will I be able to use the api's free or is there a particular paid service that these social networks offer ? I would be worried about costs when i deploy right ?
Edited
I put some questions on linkedin forums. This is the response I got
There is no extended information available via the API for developers of business accounts. The visibility is based on the user who has authenticated and what they can see in their network. The API is not designed for you to learn information about two users other than the one who has authenticated.
Seems fair from their stand point. Even a business account would not provide private information about 2 random people's "socially connected" information.
I think I need to explore the option of having my users login/connect to linkedIn and provide me with that information. Crazy as it sounds, I will explore this.
No they should both be free. Linked in has a ton of token requirements for pulling deep information. Be sure to read the linked in Docs pretty indepth. LinkedIn hates if your exporting any user data and will throw you under the bus in a minute if you attempt this. Also linked in's very limiting tword the # of calls you can make per account in an hour. SO be prepared for rate limiting.
A few months back I had contacted facebook, linkedin and google+ for a similar requirement. Seems that they dont appreciate scraping at all. I dont know if you intended to do that. They also mentioned that this information relates to peoples privacy, so they need to login to allow you to do that. Infact you need to be in their network to achieve something even close. You will also need a plugin/app to work along side with you, which will have other restrictions like # of requests per day/hour.
In short, you are requesting information from deep within their databases, they are not going to like it.
With some more research, its clear that without both users providing my app the authority to query on their behalf about the other user, I cannot get this working. Not even with business accounts with both linkedin and facebooks. The reason is obvious, privacy.

How to authenticate with groupon?

I'm looking to develop a groupon android app that let the user look at their purchased groupon along with other stuffs. I know there's an app out there already. But it doesn't do the other stuffs I need.
Anyways, I'm struggle on authentication? How do I take the same idea from web browser and allow my app to login with user credential and pull various information? Groupon has the API. But it seems to be specific to a client key (ie. Look at your own stuffs only)
If someone can point me to some directions, or if you wrote similar codes and could share, I would really appreciate it. I'm looking to the same authentication with living social as well.
Thank you for your time
Jack
Here is an example of how to access a web-service using Android's api's.
Authentication shouldn't be especially difficult.

Categories

Resources