In May 2015 Google turned off ClientLogin method of authentication used by ASynK. This method has been deprecated in favour of oAuth since 2012. oAuth is considered the cutting edge in authentication and authorization. But it is a f-ing PITA for programmers and open source software.
Anyways, setting up Google Contacts to be used with ASynK (without modifying anything else) needs some patience. Please read on for more details.
The good news is it can be made to work.
- Go to https://console.developers.google.com
- If you have more than one active gmail account, switch to the one you want ASynK to sync to
- Create a new project. You can call it 'My ASynK'
- Click on the newly created project
- Click on APIs & Auth -> API
- Search for 'Contacts API'
- Click on 'Enable API'
- Click on APIs & Auth -> Credentials
- click on the blue 'Create new Client ID' button
- select third bullet 'Installed application' for application type
- select 'Other' for Installed application type
- click on the blue 'Create Client ID' button
-
After you are done creating a new client ID, you will be taken to screen where there will be a 'Download JSON' button. Click on it.
-
Once it is downloaded rename it to something smaller, and move it to your
~/.asynk
directory. Actually any location or name will do, as long as you can remember it.
Note you still need to give your username, but not your password. Instead you
need to tell ASynK where to find the credentials JSON you saved in step 2
above. In the interest of time I have hacked so that you can reuse your
earlier method of authentication via ~/.netrc/
or entering it via command
line.
username: your gmail username
password: the path to your credentials json you downloaded in step 2
Note --gcuser
and --gcpw
commandline flags are not currently working
For e.g. Here is the extract from my ~/.netrc for one of the profiles.
machine gc_testbbgc
login karra.etc
password ~/.asynk/karra.etc.json
Note that the password is not really a password but the location of the credentials json. If you choose not to use the netrc file, you can enter the above data from the keyboard as well when ASynK will prompt you.
$ pip install httplib2 oauth2client PyOpenSSL google-api-python-client
There may be a few others, so please tell if you additional are required.
Some of the submodules have been updated. So you may have to do the following as well:
$ git pull --recurse-submodules
$ git submodule update --recursive
- The username you provide should match actual user you select.
- The client credentials json you save remains on your computer and not shared with anyone.
- There is no easier way to set this up. Sorry.
- The browser-based user consent step should be required only once.