Is there a way to change gmail password programmatically using java?

Is there any way using gmail password to programmatically use java?

+8
java google-api
source share
5 answers

The google guide provisioning API uses the updateUser method, which accepts a UserEntry object. You can use it to update the password, I suppose you have to try it. Check javadocs to determine UserEntry

+2
source share

I would be very surprised if I could, and that doesn't look like that.

This page displays a list of settings that you can change in Google Apps "Email Settings API", but the change password does not exist.

http://code.google.com/googleapps/domain/email_settings/developers_guide_protocol.html#GA_email_settings_api_ops

NTN

0
source share

I think yes. You can record all the work with Selenium web pages, check if everything is in order, and after exporting to java code - a problem may arise if Google uses CAPCHA

0
source share

Uh, just use the http client to publish this web page: https://www.google.com/accounts/b/0/EditPasswd . Use http://hc.apache.org/httpclient-3.x/ or something similar. You will need to properly track cookies, so Google believes that you are logged in when the page loads. But yes, obviously this is possible. If your browser can do this, you can do it programmatically by sending http requests. If you want to be careful, you can use something like tamperdata in firefox to sniff what your browser sends when you request a password change, so you don't skip any quiet fields or anything else.

0
source share

Using the Google Provisioning API to change the password, you must set its login for the UserEntry object:

import sample.appsforyourdomain.AppsForYourDomainClient; ... AppsForYourDomainClient client = new AppsForYourDomainClient(email, password, domain); UserEntry user = client.retrieveUser("username"); user.getLogin().setPassword("newpassword"); client.updateUser("username", user); 
0
source share

All Articles