© 2015 X2Engine Inc.
Difference between revisions of "Google Integration"
From X2Engine
(→Creating the API Project) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Support]] | [[Category:Support]] | ||
− | Enabling Google Integration will let users synchronize their Google Calendars with content from their | + | Enabling Google Integration will let users into X2Engine using their Google accounts. Furthermore, they will be able synchronize their Google Calendars with content from their X2Engine user calendars, as well as access their Google Drive files. |
= Creating an API Project = | = Creating an API Project = | ||
− | To enable Google integration, you will first need to create a Google API project for your | + | To enable Google integration, you will first need to create a Google API project for your X2Engine installation. To do this: |
− | + | # Go to your [https://code.google.com/apis/console/ Google APIs Console] while logged into your Google account. | |
+ | # Click "Create Project". You should be directed to the ''Services'' tab. | ||
+ | # Turn on the "Calendar", "Drive", and "Google+" items by clicking on the toggle switch button next to their names and agreeing to the usage terms and conditions.. | ||
# Go to the ''API Access'' tab and click "Create an OAuth 2.0 client ID". | # Go to the ''API Access'' tab and click "Create an OAuth 2.0 client ID". | ||
# Enter a product name. This is what users will see when they are prompted to allow the application to access their Google account. | # Enter a product name. This is what users will see when they are prompted to allow the application to access their Google account. | ||
# For the type of the application, select "Web Application." | # For the type of the application, select "Web Application." | ||
# You should see a section entitled "Client ID for Web Applications". In that section, select "Edit Settings." | # You should see a section entitled "Client ID for Web Applications". In that section, select "Edit Settings." | ||
− | # In the ''Authorized Redirect URIs'' box, put in the following | + | # In the ''Authorized Redirect URIs'' box, put in the following three URIs, replacing <tt>domain.name/webroot</tt> with the domain name and web directory where X2Engine is installed: |
<nowiki>http://domain.name/webroot/index.php/calendar/syncActionsToGoogleCalendar</nowiki> | <nowiki>http://domain.name/webroot/index.php/calendar/syncActionsToGoogleCalendar</nowiki> | ||
<nowiki>http://domain.name/webroot/index.php/site/googleLogin</nowiki> | <nowiki>http://domain.name/webroot/index.php/site/googleLogin</nowiki> | ||
+ | <nowiki>http://domain.name/webroot/index.php/site/upload</nowiki> | ||
+ | # Furthermore, in the ''Authorized Javascript Origins'' put in the following URI, replacing <tt>domain.name</tt> with the domain name where X2Engine is installed: | ||
+ | <nowiki>http://domain.name/</nowiki> | ||
− | = Configuring | + | = Configuring X2Engine = |
− | # In | + | # In X2Engine, go to "Google Integration" under the '''System Settings''' section of the '''Admin''' page. |
− | # Check the box to enable integration, and paste the Client ID and Client Secret from the "Client ID for Web Applications" on the API Access page of your Google Console | + | # Check the box to enable integration, and paste the Client ID and Client Secret from the "Client ID for Web Applications" on the API Access page of your Google Console. |
= Individual User Login = | = Individual User Login = | ||
− | Each user wishing to log in using their Google account should first go to '''Update Profile''', which can be found in the left menu when they are viewing their profile, and set the Google ID field to their GMail address. Then, to login: | + | Each user wishing to log in using their Google account should first go to '''Update Profile''', which can be found in the left menu when they are viewing their profile, and set the '''Google ID''' field to their GMail address. Then, to login: |
# Log out | # Log out | ||
# Click "Login with Google" at the login screen, and follow the link "Login with Google ID" | # Click "Login with Google" at the login screen, and follow the link "Login with Google ID" | ||
− | # Click the necessary button button to permit | + | # Click the necessary button button to permit X2Engine to access your Google account. |
Latest revision as of 23:48, 6 February 2014
Enabling Google Integration will let users into X2Engine using their Google accounts. Furthermore, they will be able synchronize their Google Calendars with content from their X2Engine user calendars, as well as access their Google Drive files.
Creating an API Project
To enable Google integration, you will first need to create a Google API project for your X2Engine installation. To do this:
- Go to your Google APIs Console while logged into your Google account.
- Click "Create Project". You should be directed to the Services tab.
- Turn on the "Calendar", "Drive", and "Google+" items by clicking on the toggle switch button next to their names and agreeing to the usage terms and conditions..
- Go to the API Access tab and click "Create an OAuth 2.0 client ID".
- Enter a product name. This is what users will see when they are prompted to allow the application to access their Google account.
- For the type of the application, select "Web Application."
- You should see a section entitled "Client ID for Web Applications". In that section, select "Edit Settings."
- In the Authorized Redirect URIs box, put in the following three URIs, replacing domain.name/webroot with the domain name and web directory where X2Engine is installed:
http://domain.name/webroot/index.php/calendar/syncActionsToGoogleCalendar http://domain.name/webroot/index.php/site/googleLogin http://domain.name/webroot/index.php/site/upload
- Furthermore, in the Authorized Javascript Origins put in the following URI[[wikipedia:Uniform Resource Identifier]]: The part of a URL that identifies the resource on the server to be accessed. In the context of the API, this refers to the relative path within the web server based in the web root of X2Engine, i.e. ''index.php/api2/Contacts/324.json'' as opposed to the full URL, which begins with the protocol (i.e. "http") and might also contain a path relative to the web site's document root, replacing domain.name with the domain name where X2Engine is installed:
http://domain.name/
Configuring X2Engine
- In X2Engine, go to "Google Integration" under the System Settings section of the Admin page.
- Check the box to enable integration, and paste the Client ID and Client Secret from the "Client ID for Web Applications" on the API Access page of your Google Console.
Individual User Login
Each user wishing to log in using their Google account should first go to Update Profile, which can be found in the left menu when they are viewing their profile, and set the Google ID field to their GMail address. Then, to login:
- Log out
- Click "Login with Google" at the login screen, and follow the link "Login with Google ID"
- Click the necessary button button to permit X2Engine to access your Google account.