Setting up access to Google DriveWordPress

To generate a Client ID, you need to follow a few steps in your Google account.

  • Create a project:
    • Open list of projects.
    • Click on the ‘Create Project’ button.
    • Give your project a name and click on ‘Create’.
  • Enable API:
    • Click on the top left ‘Menu icon’ and choose ‘API and Services’ -> ‘Library’.
    • Search and enable ‘Google Drive API’ and ‘Google Picker API’.
  • Create application:
    • Click on the top left ‘Menu icon’ and choose ‘API and Services’ -> ‘OAuth consent screen’.
    • Choose ‘External’ and click on ‘Save’.
    • Enter the application name (e.g. My Google Drive Accessor) and choose E-mail.
    • Add your WordPress’s domain in ‘Authorised domains’ and press ‘Save and continue’.
    • Add ‘…/auth/drive.file’ and ‘…/auth/drive’ to scopes and press ‘Save and continue’.
    • Leave ‘Optional info’ blanks and press ‘Save and continue’.

    Note. If the access is needed only for personal or test use the notice about unverified up can be ignored.

  • Create Client ID:
    • Click on the ‘Credentials’ link in the left sidebar.
    • Now click on top ‘Create Credentials’ dropdown button and select ‘OAuth Client ID’.
    • Select ‘Web application’ as Application type, enter your WordPress website’s URL with ‘www.’ as Authorized Java Script origin (http://www.yourwebsite.com), and click on the ‘Create’ button. Now you have your Client ID created.

Now copy the Client ID from the ‘Credentials’ page and paste them in the corresponding field in the settings on your WordPress website.

Leave a Reply