/contrib/famzah

Enthusiasm never stops


Leave a comment

Authentication for google-sites-liberation

I am doing a regular backup of my Google Sites using the free tool google-sites-liberation. Out of the blue, today I got the following authentication error:

Aug 06, 2014 2:34:08 PM com.google.sites.liberation.export.Main doMain
SEVERE: Invalid User Credentials!
Exception in thread "main" java.lang.RuntimeException: com.google.gdata.client.GoogleService$InvalidCredentialsException: Invalid credentials
        at com.google.sites.liberation.export.Main.doMain(Main.java:89)
        at com.google.sites.liberation.export.Main.main(Main.java:97)
Caused by: com.google.gdata.client.GoogleService$InvalidCredentialsException: Invalid credentials
        at com.google.gdata.client.GoogleAuthTokenFactory.getAuthException(GoogleAuthTokenFactory.java:586)
        at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:490)
        at com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:336)
        at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:362)
        at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:317)
        at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:301)
        at com.google.sites.liberation.export.Main.doMain(Main.java:79)
        ... 1 more

This was followed by an email with subject “Google Account: sign-in attempt blocked”, which was a very useful hint by Google!

It turns out that they are now blocking login attempts from apps or devices that do not use modern security standards, according to their “Less secure apps” documentation.

Once I enabled the “Access for less secure apps”, I was able to export my Google sites using “google-sites-liberation”. It’s highly recommended that you disable the less secure authentication once you’ve finished the backup.