Dropfiles: Google Drive Integration
1. Login to Google Drive in Dropfiles
From now, you can save a lot of time while connecting to the Google Drive server. First, in order to use this feature, you have to connect your Joomunited account at Dropfiles Settings > Live Updates tab, please click on the Link My Joomunited Account button and login if you have not connected.
Then go to Cloud connection > Google Drive tab and just click on Connect Google Drive button on the right corner.
Then follow the next steps to finish the connection.
With the credentials in the previous step, please go to Joomla admin and click on the menu Dropfiles > Options > Cloud connection tab > Google Drive settings section. Paste your
- Client ID
- Client secret
Then save the configuration and click on the Connect button.
After that, a pop-up window will be shown and you can select your account.
If you haven’t made any mistakes you should select Google account and validate the authorization in a new window like below.
Connection should be a success ☺ Simultaneously, you will see the parameter "Watch changes from Google Drive" is turned on. If you turn off Files and Folders will not be synchronized immediately from Google Drive to your Dropfiles.
Now, you can create Google Drive folders and upload files in it!
Google have recently introduced a new security layer that forces apps to be verified. If you've created the app with your Google account and then you login from Joomla with the very same account you won't see this error.
This error will only appear if you've created an App with a Google account and trying to connect to Google from Joomla with another account.
In this case you need your app to get approved by Google following this process: https://support.google.com/code/contact/oauth_app_verification
2. How it works? What can I do with GG Drive?
How it works?
Dropfiles will generate a root folder on your Google Drive with the site name
All the categories and sub categories added in Dropfiles will added under this folder.
What are the sync directions?
It works in both directions! You can add a file from Google Drive and see it in Dropfiles or add a file in Dropfiles and see it in Google Drive. It also means you can manage files in Dropfiles from your desktop using Google Drive sync software. That’s crazy! Yes we know ☺
Note that if you remove a file from Google Drive you have to empty your trash to erase it from Google Drive.
3. Create a Google drive App
The Google Drive is included in the main Dropfiles package.
First, you need a Google dev App to connect your website to Google Drive. Go to https://console.cloud.google.com/ and create a new project.
Then setup a project name (no space, no accent)
Then wait few seconds for the project creation…
If it's the first time you're using the Google Drive API, you should go to Navigation menu > APIs and Services > Library to activate it.
From the left menu, click on “Navigation menu > APIs and Services”
Then on the left menu “Credentials”, on the main panel click “ + Create Credentials” >> OAuth client ID (if asked, add a name to your OAuth consent screen).
Now, the most important step.
- Select “Web application” and add a name of your choice.
- Authorized redirect URIs: https://your-domain.com/administrator/index.php?option=com_dropfiles&task=googledrive.authenticate (put your domain name)
Then you need to select User Type, Internal is often for accounts in an organization or team and External is for personal accounts.
- Internal: your app is limited to Google Workspace (known as G Suite) users within your organization. You will not need to submit your app for verification.
- External: your app will available to any user with a Google account but your app should be public and verified.
Then, fill in your authorized domains and continue with the following steps to finish the app registration. Now you can back to the previous step Select “Web application” to create the credentials.
And the publishing status should be Production, if it's currently Testing, you should click on Publish app button to change the status.
Then… voilà! You got your ID and Secret to add in the Dropfiles configuration.