I’ve just ported the googlecontacts.py for Asterisk to playSMS. It allows you to centrally manage your phonebook in playSMS from Google Contacts.
- Setup Google 2-step verification.
- Install Python and mysql connector
sudo apt-get install python python-mysql.connector
- Download and install argparse
- Download and install tlslite
- Download and install Gdata python client
- Download and install oauth2client
- Download gcontacts script googlecontacts.py (12.7 KB)
- Login to Google Developers Console
- Create a new project
- Enable the “Contacts API”
- In the Credentials, download the json file by clicking the download icon
- Save the file in googlecontacts.py folder and rename it as ‘client_secret.json’
- update MYSQL_USER and MYSQL_PWD in googlecontacts.py
- Test the script with the following command ./googlecontacts.py --noauth_local_webserver
- If you get a list of your contacts then run ./googlecontacts.py --playsms --noauth_local_webserver to actually load your contacts into the playSMS phone book.
Note:
Phonebook contacts are created under admin account. You can use --username to switch to different account.
If you are using Groups, you have to manually create in playSMS to sync with group membership.