Setup Google Drive
Setup Google Drive
Get business and IT benefits with Google Drive. Google drive reduces infrastructure cost and management and allows your end-customers to easily upload large files directly in the drive. It is highly recommended for businesses to integrate the best storage solution offered by Google.
Read below a systematic guide to integrate Google Drive into your website.
Step – 1 Create New Project
- Visit https://console.developers.google.com/
- Login with your Google Account.
- After successful login, create a New Project from a ‘NEW PROJECT’ Button.
- Enter your project name and location to create a project
- After creating a project Google Developers page will lead you to your project dashboard. Click on Go To APIs Overview.
Step – 2 Enable APIs and create credentials
- The APIs Overview button will redirect you to your project dashboard.
- Click on the ‘ENABLE APIS AND SERVICES’ button.
- Search ‘Google Drive’
- Enable the API.
- To use Google Drive API in your store, you may need credentials. Click 'Create credentials' to get started.
Step – 3 Add Credentials to your project
- Select which API you are using, as different APIs use different auth platforms, and some credentials can be restricted for certain APIs. In this case, choose the Google Drive API.
- Choose from where you will call the API i.e. ‘Web Server’.
- Select the type of data you are willing to access i.e. ‘User Data’.
- Now click on ‘What Credentials Do I Need?’ button and set up an OAuth consent Screen.
Step – 4 Set up OAuth Consent Screen
- When finished click on the Submit.
Step – 5 Get Credentials
- For the credentials click on ‘Credentials’ at the left bar.
- Click ‘+CREATE CREDENTIALS’ then OAuth Client ID.
Step – 6 Create OAuth Client ID
- Select application type as – ‘Web Application’
- In Authorized redirect URIs enter the URL in the following manner –http://www.<yourdomainname>.com/admin/configuration_external_service_action.php
- Click on create
Redirect URI for Google Login - http://www. <yourdomainname>.com/user_registration.php
Redirect URI for Google Photos - http://www. <yourdomainname>.com/studio/Services/images.php
Step – 7 Copy the credentials
- Copy the Client ID and Client Secret key to configure into Admin Panel.
Step – 8 Apply for verification
- Go to, OAuth consent screen >> Edit App
- Check the Application details and Submit for verification. In the next pop-up enter your application details, and provide a contact email address. Next, click on Submit.
Google will verify your business and application details, thus allowing you to use Google Apps on your website without any hassle or verification error. Your application verification status will change to ‘Being Verified’.
If your application isn’t verified then google displays a safety error to your customers, as shown below –
With this error, your application may work for a few days but it is advisable to get the application verified to avoid any further inconveniences.
Step – 9 Admin Panel Configuration
- In the next screen click on ‘Connect Me’ and give required permissions to google drive.
- This will generate the Access Token.
- Next, enter the folder name where all the files uploaded by a customer while placing an order will be saved.
- Click on ‘Save and back’.
How to enable Cloud File Upload?
To enable customers to upload files directly into your Google Drive storage you will have to Allow Cloud File Upload for a product from the Product section.
Enable this from-
Front Store – The above setting will show a button on the Upload Design page which will allow your customers to upload Cloud File.