This manual is deprecated. Please visit https://groupoffice.readthedocs.io for the latest documentation.

Difference between revisions of "Google Drive"

From Group-Office Groupware and CRM Documentation
Jump to: navigation, search
(Installation instructions)
(Add API key to groupoffice)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
The Google Drive module (Available since 4.1.25) allows you to edit your Group-Office documents with the Google editor in the browser. The following video demonstrates it.
 
The Google Drive module (Available since 4.1.25) allows you to edit your Group-Office documents with the Google editor in the browser. The following video demonstrates it.
  
<HTML5video width="420" height="315" type="youtube">c9C7VYYINdI</HTML5video>
+
<html>
 +
<iframe width="420" height="315" src="//www.youtube.com/embed/c9C7VYYINdI" frameborder="0" allowfullscreen></iframe>
 +
</html>
  
 
=Installation instructions=
 
=Installation instructions=
  
Visit https://code.google.com/apis/console and generate an API key and OAuth 2.0 credentials for your Group-Office installation. You'll need to enter a redirect URL. For this URL you must enter:
+
== Create an API key ==
  
http://your.domain/groupoffice/index.php?r=googledrive/file/connect
 
  
Make sure that Google Drive is enabled at the services page.
+
1. Visit https://code.google.com/apis/console
  
Once your key is setup enter the following values in config.php:
+
2. Login with your google account (if you haven't already)
 +
 
 +
3. Press the "Create Project"  button.
 +
 
 +
4. Find "Drive API" in the list of google API
 +
 
 +
5. Toggle the On/Off switch to "On" and accept the terms of services
 +
 
 +
6. Click "Credentials" in the menu on the left
 +
 
 +
7. Click "Create new client ID" Select "Web application" Enter the Email and Project name and press "Save"
 +
8. Enter {http://your.domain} for "Autorized javascript origins" and {http://your.domain/groupoffice/index.php?r=googledrive/file/connect} for "Redirect URIs"
 +
 
 +
9. Click "Create new key", select "Browser key" enter {your.domain.com/*} in the text field and press "Create"
 +
 
 +
 
 +
== Add API key to groupoffice ==
 +
 
 +
Now that the Google API credentials are created add them to the config.php file of GroupOffice
  
 
<pre>
 
<pre>
 
$config['googledrive_oauth2_client_id']='';
 
$config['googledrive_oauth2_client_id']='';
 
$config['googledrive_oauth2_client_secret']='';
 
$config['googledrive_oauth2_client_secret']='';
$config['googledrive_simple_api_key']='';
 
 
</pre>
 
</pre>
 +
 +
[[File:drive_api.png]]
  
 
Now install the module in Group-Office at Start menu -> Modules -> Install and grant permissions.
 
Now install the module in Group-Office at Start menu -> Modules -> Install and grant permissions.
  
 
Now editing should work by connecting your personal Google account!
 
Now editing should work by connecting your personal Google account!
 +
 +
== Installation when PHP runs in CGI mode ==
 +
If you use PHP through CGI or FastCGI and Apache authentication headers are not passed through by default. You can enable this with the following mod_rewrite rule:
 +
 +
<IfModule mod_rewrite.c>
 +
  RewriteEngine on
 +
  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
 +
</IfModule>

Latest revision as of 09:49, 30 October 2017

The Google Drive module (Available since 4.1.25) allows you to edit your Group-Office documents with the Google editor in the browser. The following video demonstrates it.

Installation instructions

Create an API key

1. Visit https://code.google.com/apis/console

2. Login with your google account (if you haven't already)

3. Press the "Create Project" button.

4. Find "Drive API" in the list of google API

5. Toggle the On/Off switch to "On" and accept the terms of services

6. Click "Credentials" in the menu on the left

7. Click "Create new client ID" Select "Web application" Enter the Email and Project name and press "Save" 8. Enter {http://your.domain} for "Autorized javascript origins" and {http://your.domain/groupoffice/index.php?r=googledrive/file/connect} for "Redirect URIs"

9. Click "Create new key", select "Browser key" enter {your.domain.com/*} in the text field and press "Create"


Add API key to groupoffice

Now that the Google API credentials are created add them to the config.php file of GroupOffice

$config['googledrive_oauth2_client_id']='';
$config['googledrive_oauth2_client_secret']='';

Drive api.png

Now install the module in Group-Office at Start menu -> Modules -> Install and grant permissions.

Now editing should work by connecting your personal Google account!

Installation when PHP runs in CGI mode

If you use PHP through CGI or FastCGI and Apache authentication headers are not passed through by default. You can enable this with the following mod_rewrite rule:

<IfModule mod_rewrite.c>

 RewriteEngine on
 RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

</IfModule>