Links

Getting Google Drive API

Watch the video guide
This is a bit tricky. You need to add a Client ID also along with API key for Google Drive.
  1. 1.
  2. 2.
    Click on 'New Project' button
  3. 3.
    Give your project a name and click on 'Create'
  4. 4.
    Select created project from the project list
  5. 5.
    Select 'Enabled Apis and Services' from APIs & Services
  6. 6.
    Open API Library
  7. 7.
    Search for 'Google Drive API', click on it and enable it
  8. 8.
    Select 'Credentials' from APIs & Services
  9. 9.
    Click on 'Create Credentials' and select OAuth client ID
  10. 10.
    Click on OAuth consent screen and choose user type 'External' and click 'Create' button
  11. 11.
    On the following screen, enter App name, select support email, and add your domain name under 'Authorized domains'
  12. 12.
    Click on 'SAVE AND CONTINUE' on the Scopes screen
  13. 13.
    For testing the App you have to Add the test users email id from the 'Add Users' link
  14. 14.
    Go back to APIs & Services tab click on ‘Create Credentials’ dropdown button and select OAuth Client ID
  15. 15.
    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'
  16. 16.
    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’
  17. 17.
    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.