In the Add Google File dialog box, I just get the Google Error “Forbidden”

First, are you sure you followed all configuration instructions of the Google Apps Login plugin, including enabling Drive API…?

Google Apps’ user and permissions systems are complex, and there are many ways you could unintentionally forbid your users from using the Drive API.

You could have disabled API access completely, so take a look in your Google Apps admin panel and look for anything obvious.

One reason a lot have people have seen ‘forbidden’ in the past is because they have the following setting unchecked: go to Google Apps -> Drive, and then General Settings -> Allow users to install Google Drive apps.

After changing settings, you should logout of WordPress and Google, then refresh and try all over again.

Most users cannot see my embedded file

The Google viewer needs to have permission to show the file to whichever Google user is logged into the browser. The easiest way to ensure this is the case – and so even users who are logged out of Google can see the file – is to locate the file in Google Drive and click Share. Change to ‘Anyone with the link can view’ to be sure all users can see the file.

I don’t want users to need their own Google account to view folders – they keep being asked to authorize

(Enterprise version of Google Drive Embedder)

It sounds like you have embedded the folder as a ‘Quick Folder’, and that does require the user to have their own Google account in order to view. Instead you need to use ‘Controlled Folders’ with View permissions set to ‘Always’ within the plugin. This uses the Service Account behind the scenes instead of the user’s own Google account.

There are more details about Controlled Folders etc in our docs here.

And this is a quick guide to what you need to change:

In Settings -> Google Drive Embedder, go to the Folder Controls tab.

Under the ‘Default Folder Permissions’ section, change the ‘View’ column of dropdowns to ‘Always’ as follows:

Screen Shot 2016-02-04 at 20.28.11

The ‘Upload’ column should be set to ‘Never’.

Next, you need to embed the folders again using the Add Google File button. This time, expand the Options area before you insert the file, and select ‘Register a Controlled Folder’ as follows:


You can leave these dropdowns as ‘Default’ and it will pick up the new ‘Always’ defaults that you just set in the Settings page. Alternatively, you could change the View column to ‘Always’ here instead, but of course you would need to do that for every folder that you embed. That’s why I suggest changing the default permissions in settings.

The shortcodes should now look something like this instead:

[google-drive-folder cfid="125" title="The Folder"]

Controlled Folders use “cfid” instead of the Drive “id” in the shortcode – that’s how you can see the difference by looking at the shortcode alone.

Please note, it still also makes sense to share the folder/files as ‘Anyone with the link can view’ in Drive itself, so users can view the files themselves. The above ‘Controlled Folder’ takes care of viewing the file listings only.

I don’t want users to grant Drive access at login

By default, when you install the Google Drive Embedder plugin, whenever users ‘Login with Google’ to the site they will be asked to grant Drive and Calendar permissions.

You may not want this, especially if most users won’t need to interact with the Drive plugin.

It is possible to remove these at the login stage by adding this code to your own plugin or your Theme’s functions.php file:

function dd_my_gather_scopes($scopes) {
   return preg_grep( "/drive|calendar/", $scopes, PREG_GREP_INVERT );

add_filter('gal_gather_scopes', 'dd_my_gather_scopes', 20, 1);
Google Apps Login is trusted by thousands of organizations from small businesses to NASDAQ-listed companies and government organizations.

Users click their way through Login via Google (just one click after the first time)

Users click their way through Login via Google (just one click after the first time)

You can try it out by clicking below to auto-create a test account on this site! This will show you the basic Google login process.
Try out Google login

Logging in is only the start – Google Apps Login takes care of all your WordPress user management. Find out more here.