Map Google drive to Owncloud
Using the Google Drive external storage in ownCloud, you can mount all or a subfolder of Google Drive.
This requires configuration through Google to get an app ID and app secret, as ownCloud registers itself as an app. All applications that access a Google API must be registered through the Google Cloud Console.
1. You can use your existing Google account such as Groups, Drive, or Mail, or create a new one and log into the Google Cloud Console. After logging in click the Create Project button on the top right side.
2. Add a new project by clicking the + button on the top right side.
3. Give your project a name, and either accept the default Project ID or create your own, then click the Create button.
4. After your project is created, click on the notifications bell and select your project.
5. Go to Api overview to select google’s API.
6. Select Google Drive API
7. Enable the Google Drive API
8. You now must create your credentials.
9. First, select Web Browser and User data.
10. The next screen that opens is Create OAuth 2.0 Client ID. Enter your app name.
Configure Authorisations
These authorisations are necessary to tell Google which source URI requests are allowed. You can configure multiple Authorized URIs if you wish to enable admin and personal access at the same time for different purposes.
Authorized Redirect URIs
To configure Authorized Redirect URIs, select one of the two possible URI Schemes.
https://<your domain>/index.php/settings/admin?sectionid=storage
or
https://<your domain>/index.php/settings/personal?sectionid=storage
Authorized JavaScript Origins
This is just https://<your domain> which represents how you access your ownCloud server, where you see the login screen.
Configure to connect to Google Drive
1. Login to your ownCloud account
2. Go to Storage in the Settings
3. Enable external Storage
4. Select Google Drive
5. The Google Drive App is enabled. Give the mount point a meaningful name.
6. Copy the Authorized Redirect URI from the browser
7. Enter it the Google Drive Console here
8. Choose a project name for the consent screen.
9. Download the credentials as JSON file.
Here is an example output:
10. Client ID and Client Secret
Enter the Client ID and Client Secret in the ownCloud Google Drive mount screen and click Grant Access. Now you have everything you need to mount your Google Drive in ownCloud. Your consent page appears when ownCloud makes a successful connection.
Click Allow when the consent screen appears.
11. Success
You are finished when you see the green light confirming a successful connection.
12. Files View
Go to your files view. You will see the newly mounted Google Drive.