Note | |
---|---|
For use with the Upload to Google Drive post-processing engine. |
Note | |
---|---|
This needs to only be done once, on the site which you will be using to host the OAuth2 helpers. It may be the same, or a different site than the one you are going to use the helpers on. |
Log into the backend of the site you want to host the OAuth2 helpers.
If you're on WordPress: go to Akeeba Backup.
Click on System Configuration.
Click on the OAuth2 Helpers tab.
Set OAuth2 Helper for Google Drive to Yes. You will see a blue note with three URLs below. Copy the Callback URL. It looks something like this (line breaks added for clarity):
https://www.example.com/index.php?view=oauth2&task=step2&format=raw&engine=googledrive
Copy this URL. Please remember that you need to use this URL verbatim in a later step.
Click on the Close button, without saving the component options.
Log into the Google Cloud Console.
Click the top drop-down (project selection) and click on New Project.
Give it a name and click on Create.
Make sure the application is selected in the drop-down at the top. If not, do it now.
Click on the hamburger menu icon on the top left. Click on
, .Look for Google Drive API and click on the item by that name.
Click on Enable.
Click on the hamburger menu icon on the top left. Click on
, .Choose External. Click on .
Fill in all the required fields. In the Authorized domains section click on Add Domain and enter the domain of the site where the custom OAuth2 helper will be hosted.
Click on
.Click on
.Look for auth/drive and select (check) the scope which appears as .../auth/drive, then click on
. You should now see it under "Your restricted scopes".Click on Save and Continue.
Optional. Click on Add Users to add the Google Account email addresses of everyone who will be allowed to use this API application to link their Akeeba Backup installations with Google Drive. Otherwise, only you (the account which created this API app) will be able to log in.
Click on
.Click on the hamburger menu icon on the top left. Click on
, .Click on OAuth Client ID.
, then click onSelect Web application in the drop-down.
Find Authorized redirect URIs and click on under it.
Paste the Callback URL you copied earlier.
Click on
.Copy the Client ID and Client Secret displayed to you.
Log into the backend of the site you want to host the OAuth2 helpers.
If you're on WordPress: go to Akeeba Backup.
Click on System Configuration.
Click on the OAuth2 Helpers tab.
Set OAuth2 Helper for Google Drive to Yes.
Paste the Client ID and Client Secret you copied in the previous step into the same-named text boxes under the "OAuth2 Helper for Google Drive" section.
Click on
.Note | |
---|---|
This needs to be done on every Akeeba Backup installation and backup profile which will be using this custom OAuth2 helper. The site using the OAuth2 helper does not necessarily have to be the same site you have set up the OAuth2 helper on. |
Log into the backend of the site which hosts the OAuth2 helpers.
If you're on WordPress: go to Akeeba Backup.
Click on System Configuration.
Click on the OAuth2 Helpers tab.
Find the OAuth2 Helper for Google Drive. You will see a blue note with three URLs below.
Copy the OAuth2 Helper URL and OAuth2 Refresh URL.
Log into the backend of the site you will be taking the backups on. This may be different than the site which hosts the OAuth2 helpers.
If you're on WordPress: go to Akeeba Backup.
Select your backup profile, and click on Configuration.
Scroll down to the Post-processing Engine.
Select Upload to Google Drive
Change the OAuth2 Helper to Custom.
Paste the OAuth2 Helper URL and OAuth2 Refresh URL you copied in the previous step.
Click on Save. This is important! Until you click on Save, Akeeba Backup does not know you intend to use a custom OAuth2 Helper.
When the page reloads, click on Authentication - Start here.
Tip | |
---|---|
You will know you are doing it right if the popup displays a warning letting you know what you are about to link it with an application which is not under the control of Akeeba Ltd. If you see the Google Drive interface, you missed the previous step (clicking on Save); in this case close the popup, click on Save, and then click on Authentication - Start here again. |
Go through the authentication.
At the end, you will see an Access Token and a Refresh Token. Copy them into the respective fields of your Akeeba Backup profile.