\\
__Google Drive REST API v3__ based integration: [Google Drive API Link|https://developers.google.com/workspace/drive/api/reference/rest/v3] Authentication is handled through __OAuth 2.0__ ([OAuth Wikipedia Link|https://en.wikipedia.org/wiki/OAuth]), ensuring secure, user-consented access to Google Drive data.\\
\\
__!!! Proxy Configuration:__ If your server accesses the internet through a proxy, make sure to whitelist the following domains for Google Authentication and Drive access:\\
- __oauth2.googleapis.com__\\
- __www.googleapis.com__\\ 
\\
Start by navigating to Google APIs & Services: [Google APIs & Services Link|https://console.developers.google.com/projectselector/apis/credentials]\\
\\
__!!!Note:__ Ensure sure the __Google Drive API__ is enabled at __Enabled APIs & services__. [Google API Library Link|https://console.cloud.google.com/apis/library]\\
\\
[SMTP Google Mail Integration/g_api_services.png]\\
[attachments|enable_api.png]\\
\\
Go to the __Credentials__ menu, click on __Create Credentials__, and select __OAuth client ID__:\\
[SMTP Google Mail Integration/create_credentials.png]\\
\\
Choose Web application:
\\
[SMTP Google Mail Integration/credential_config_gdrive.png]\\
\\
It is required to set up the Authorized Redirect URIs. You can put a domain (where your CrushFTP is available), or localhost. The URI needs to end with:\\
{{{
?command=register_gdrive_api
}}}\\
[attachments|credential_config.png]\\
\\
Now that the API is enabled, and your credentials are setup, and your redirect domains are configured, you can use the credentials in CrushFTP to get your google auth token and get access.\\
__CrushFTP admin page url must match with the redirect url.__ In our example: http://XXXXcrushftp.com\\
In the User Manager, add a new remote VFS item type and set the protocol to be "GDrive".\\
Take your google client_id and secret and combine them together with a tilda as separator:\\
{{{
client_id: 725111111110-7kaimtXXXXXXXXXXXXXXXXXXXXX64m4k.apps.googleusercontent.com
secret: fEsXXXXXXXXXXXXXXXXPggg7
}}}
results in:
{{{
725111111110-7kaimtXXXXXXXXXXXXXXXXXXXXX64m4k.apps.googleusercontent.com~fEsXXXXXXXXXXXXXXXXPggg7
}}}
That whole long string becomes your "username" to GDrive://.\\
Copy and paste it into the user field.  Then click "Get Refresh Token" to finish the config.\\
[attachments|get_refresh_token.png]\\
\\
Finally!\\
[attachments|test_success.png]\\