Creating an App
To create an application, you have to register on Google, go to https://cloud.google.com/console and follow these steps:
Proceed as follows:
- Click on “Create project”;
- Define a “Project name”, accept the terms if required and press “Create”;
- Wait for the completion of the project creation;
- If prompted, press “continue on” before you can create or access a project, please verify your phone number. This takes under a minute and helps us prevent abuse. Your number will NOT be used for solicitation or marketing purposes”;
- Enter your mobile phone number;
- Press Send verification code;
- Insert the verification code sent to you via sms and press “Check”;
- Press “Create” to complete the operation;
- Click on the left “APIs & auth”;
- Click on “Credentials”;
- Press “Create new Client ID”;
- Select “Web application”;
- In the field “Authorised JavaScript origins” enter the URL of your appliance (for example: %DEVICE_URL%). The domain name that is configured in “ System Settings” in the “Domain name”, must by fully qualified. Warning! It must be a public domain;
- In the field “Authorised redirect URIs” define the callback URL in the form: “http://domain/social/googlelogin.php” (Example: Warning! It must be a public domain;
- Press “Create client ID”. Warning! If Google cannot reach the URL, it will not create the application;
- Copy the “Client ID” and the “Client secret” and bring them in the “ External Authentications” settings of HSNM in the “Google client ID” and “Google secret” fields;
- Click on the left on “Consent screen”;
- Define the various data: Product name, Homepage URL, logo, etc. and press “Save”.
Warning! The Google application requires a public domain.
How you can get an API Key and enable the APIs
HSNM uses the Google APIs to calculate GPS coordinates, display maps in the “Around Me” App, run the Social Login, etc. and, as requested by Google, to obtain these services, you must have an API Key issued by Google. HSNM uses by default an API Key predefined but shared with possible limits on the volume of services provided. To overcome these restrictions, it is recommended to obtain and insert your own API key.
After having performed the previous steps described in the section “Creating an App”, to get an API Key and to enable the services required by HSNM, follow the following steps:
- Go to the https://console.developers.google.com page;
- If it is not already selected, select the App previously created in the Combo Box on the top-right;
- Select “Credentials” on the left bar;
- Click on “Create credentials” and select “API Key”;
- When you are required the type of “Key”, select “Browser Key”;
- When you press the “Create” button, you will be displayed the API Key to copy and insert in the “General Options“;
- Click “Ok “.
At this point you must enable the services that affect the HSNM.
Proceed as follows:
- Select “Library” in the left bar;
- In the “Google Maps APIs” section, select “Google Maps JavaScript API” and click “Enable” on the page that appears;
- Re-click “Library”, in the “Google Maps APIs” section, click “More”, select “Google Maps Geocoding API” and and click “Enable” on the page that appears;
- Re-click “Library”, in the “Google Maps APIs” section, click “More”, select “Google Maps Geolocation API” and click “Enable” on the page that appears;
- Re-click “Library”, in the “Google Maps APIs” section, click “More”, select “Google Places API Web Service” and click “Enable” on the page that appears;
- Click on “Library”, in the “Social APIs” section, select “Google API” and click “Enable” on the page that appears;
With these steps, you created the API Key and enabled the required APIs.
Warning! Google APIs have restrictions on the number of requests that can be made in the last 100 seconds and daily. Although these limits are high, in some cases, it may be necessary to increase them by paying a subscription to Google (https://console.developers.google.com/billing).
Starting from 16 July 2018, to continue using Google Maps platform APIs, you have to enable billing on each project. If you choose not to add a billing account, maps will be degraded, or further Map API requests will return an error.
Creating a Page
As for the previous social network, at the end of the recording or during the login, you will probably be asked to press “Circle” to a Google page. To do this, you need to create a page and get its ID and then insert it in the configuration of the domain or gateway.
To create a page, you need to have a Google account, log in and click the Home button on the top left and follow the following steps:
- Select “Pages”;
- Click on “Create your page” in the top right;
- Follow the procedure to create a page.
To determine the ID of the page that you want to include in the configuration of the domain or gateway, perform the following steps:
- Place your mouse cursor in the upper left corner on Home and click on “Pages” in the menu that appears;
- Click on “Manage this page”;
At this point, the page’s ID is determined in the URL shown above. In practice, if the URL is https://plus.google.com/u/0/b/1234567890/dashboard/overview, the page ID will be 1234567890.