Getting Google Drive API
Last updated
Last updated
Watch the video guide
This is a bit tricky. You need to add a Client ID also along with API key for Google Drive.
Login to Google Cloud Console
Click on 'New Project' button
Give your project a name and click on 'Create'
Select created project from the project list
Select 'Enabled Apis and Services' from APIs & Services
Open API Library
Search for 'Google Picker API', click on it and enable it
Select 'Credentials' from APIs & Services
Click on 'Create Credentials' and select OAuth client ID
Click on OAuth consent screen and choose user type 'External' and click 'Create' button
On the following screen, enter App name, select support email, and add your domain name under 'Authorized domains'
Click on 'SAVE AND CONTINUE' on the Scopes screen
For testing the App you have to Add the test users email id from the 'Add Users' link
Go back to APIs & Services tab click on ‘Create Credentials’ dropdown button and select OAuth Client ID
Select 'Web application' as Application type, enter your WordPress website’s URL with ‘www.’ (http://www.yourwebsite.com) as Authorized JavaScript origins and Authorized redirect URIs and click on ‘Create button'
Now you have your Client ID created. You are almost there. Let’s create your API key! Click on ‘Create credentials’ dropdown button again and click on ‘API Key’
Select Client ID , API Key from the ‘Credentials’ page and paste them in your website’s ‘Cloud Settings’ page
Please note that the file you are embedding should be available for public.