Google Suite Users

If you need any help configuring the following steps, be sure to get in touch: info@vizito.be or via chat.

Step 1: NodeJS

Use your favorite package manager to install NodeJS

Step 2: Google Suite client

Download and extract our Google Suite client to a directory of your choice

Step 3: Config

Edit config.json to match your environment.

Steps 4, 5 and 6 need to be executed by your Google Suite administrator:

Step 4: Configure your Google Suite for API access

Go to your Google Suite administration console and navigate to Security Settings > API Management, or click here.

On this page, enable API-access and click on Save.

Step 5: Create and configure a project and API

Navigate to Google Cloud and create a new project and set the Product name to 'Vizito integration'.
Select this project when it is created and navigate to API's and services.
Click on ENABLE API'S AND SERVICES and search for 'admin'. Click on Admin SDK and click ENABLE.
Go back to the overview and go to 'Credentials'.
Click on 'Create credentials' and choose OAuth client ID.
Select 'Other' from the list and provide the name 'Vizito integration'.
This will prompt you with some details (client ID and secret). Click on OK.
Download the credentials by clicking on the download (Download JSON) button to the right of the client ID.
Move this file to the root of the Vizito working directory (the location that was unzipped) and rename it to client_secret.json.

Step 6: Run

Open a command prompt, navigate to the folder where your Google Suite client resides, and run "node server.js"

If everything works as intended, you should see "Authorize this app by visiting this url: https://..." . Navigate to this URL and log in using your Google Suite administrator.
You will receive a code which you can copy-paste from the browser into the application prompt. 
You can now use a browser to test the Google Suite http server by pointing your browser to http://ip_or_hostname_of_machine_running_google_suite_client:48800
If you're running a firewall, make sure it allows access to port 48800.
If your browser shows a JSON object representing the users you want to expose, than everything works!

Step 7: Configure the backoffice to make the tablet connect to the client

Navigate to https://backoffice.vizito.be and under Settings, configure the Host datasource as 'Managed externally' and fill in the Integration URL.
Now the tablet will look up the information from the installed client.

Step 8 (optional): Use NSSM to daemonize the node process as a Windows Service.

Download the latest release of NSSM at https://nssm.cc/download
extract the appropriate architecture executable to a folder of your choice.
now run the following command: nssm install google_suite_client
This will show a window where your service parameters can be configured.

  • Select "node.exe" as Path. It can usually be found in c:\Program Files (x86)\nodejs\node.exe
  • Edit the Startup directory and point it to the folder where your Google Suite client resides
  • Type the full path to server.js in the Arguments field
  • Optionally, you can set a Display name for your service in the Details tab.

Now go to your Windows Services, start your newly created service, and test! Remember to stop any manually started instances of the Google Suite client before starting the service.

 

on 10/29/2015 by Steven Gilissen
Was this helpful?

If you need any help configuring the following steps, be sure to get in touch: info@vizito.be or via chat.

Step 1: NodeJS

Use your favorite package manager to install NodeJS

Step 2: Google Suite client

Download and extract our Google Suite client to a directory of your choice

Step 3: Config

Edit config.json to match your environment.

Steps 4, 5 and 6 need to be executed by your Google Suite administrator:

Step 4: Configure your Google Suite for API access

Go to your Google Suite administration console and navigate to Security Settings > API Management, or click here.

On this page, enable API-access and click on Save.

Step 5: Create and configure a project and API

Navigate to Google Cloud and create a new project and set the Product name to 'Vizito integration'.
Select this project when it is created and navigate to API's and services.
Click on ENABLE API'S AND SERVICES and search for 'admin'. Click on Admin SDK and click ENABLE.
Go back to the overview and go to 'Credentials'.
Click on 'Create credentials' and choose OAuth client ID.
Select 'Other' from the list and provide the name 'Vizito integration'.
This will prompt you with some details (client ID and secret). Click on OK.
Download the credentials by clicking on the download (Download JSON) button to the right of the client ID.
Move this file to the root of the Vizito working directory (the location that was unzipped) and rename it to client_secret.json.

Step 6: Run

Run the following command:
node /path/to/googlesuiteclient/server.js
If everything works as intended, you should see "Authorize this app by visiting this url: https://..." . Navigate to this URL and log in using your Google Suite administrator.
You will receive a code which you can copy-paste from the browser into the application prompt. 
You can now use a browser to test the Google Suite http server by pointing your browser to http://ip_or_hostname_of_machine_running_google_suite_client:48800
If you're running a firewall, make sure it allows access to port 48800.
If your browser shows a JSON object representing the users you want to expose, than everything works!

Step 7: Configure the backoffice to make the tablet connect to the client

Navigate to https://backoffice.vizito.be and under Settings, configure the Host datasource as 'Managed externally' and fill in the Integration URL.
Now the tablet will look up the information from the installed client.

Step 8 (optional): Use PM2 to daemonize the node process

Please refer to https://github.com/Unitech/pm2 for instructions on how to install and use PM2.

on 10/29/2015 by Steven Gilissen
Was this helpful?