Skip to main content

Dropfiles: Google Drive Integration

1. Login to Google Drive in Dropfiles

Automatic mode

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.

 

live-updates-dropfiles

 

Then go to Cloud connection > Google Drive tab and just click on Connect Google Drive button on the right corner.

 

automatic-google-drive-dropfiles

 

Then follow the next steps to finish the connection.

 

auto-google-drive-connected-dropfiles

 

Manual mode

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.

 

google-drive-credential

 

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.

 

confirm-author

 

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.

 

watch-changes-from-Google

 

Now, you can create Google Drive folders and upload files in it!

 

new-drive

 

Get rid of the error: error: "invalid_scope when connect Dropfiles with Google Drive"

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

 

OAuth-Developer-Verification-Form


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

 

google-drive-folder


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.

 

drive-sync

 

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.

 

Create-project-1

 

Then setup a project name (no space, no accent)

 

new-project-1

 

Then wait few seconds for the project creation…

 

image62

 

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.

 

enable-drive-api

 

From the left menu, click on “Navigation menu > APIs and Services”

 

credentials-menu-1

 

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).

 

create-Credentials-1

 

Now, the most important step.

  • Select “Web application” and add a name of your choice.
  • Authorized JavaScript origin: https://your-domain.com (replace by your domain name, no slash, no www.)
  • Authorized redirect URIs: https://your-domain.com/administrator/index.php?option=com_dropfiles&task=googledrive.authenticate (put your domain name)
This is the backend Dropfiles URL + &task=googledrive.authenticate

 

create-web-application

 

Note: if this warning appears: "Invalid Origin: domain must be added to the authorized domains list before submitting", press authorized domains list link or go to APIs & Services >> OAuth consent screen, then add your domain name at Authorized domains.

Then you need to select User Type, Internal is often for accounts in an organization or team and External is for personal accounts.

 

OAuth-user-type

 

  • 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.

 

consent-screen

 

And the publishing status should be Production, if it's currently Testing, you should click on Publish app button to change the status.

 

publish-app

 

Then… voilà! You got your ID and Secret to add in the Dropfiles configuration.

 

oauth-client-1