Skip to content

Instantly share code, notes, and snippets.

@jhowbhz
Created October 18, 2023 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhowbhz/dd38448e6080845d0faf9cb754aacf0c to your computer and use it in GitHub Desktop.
Save jhowbhz/dd38448e6080845d0faf9cb754aacf0c to your computer and use it in GitHub Desktop.
Create Google API credentials in 50 easy steps

Create Google API credentials in 50 easy steps

Google has made it really easy to create api credentials for own use, just follow these few steps:

  1. Go to Google Cloud Console
  2. Create a new project (or select an existing) from the menu [screenshot]
  3. Search for drive api in the search bar and select Google drive api under the marketplace section [screenshot]
  4. Click to enable Google Drive API button [screenshot]
  5. Click on the Credentials menu item
  6. Click on the Configure Consent Screen button [screenshot]
  7. Select External user type (Internal is only available for workspace subscribers) [screenshot]
  8. Click on the Create button
  9. Fill out the fields App name, User support email, Developer contact information with your information; you will need to put the Project ID into the app name (keep the other fields empty) [screenshot]
  10. Click the Save and continue button. If you get An error saving your app has occurred try changing the project name to something unique
  11. Click the Add or remove scopes button
  12. Search for google drive api
  13. Select the scopes .../auth/drive and .../auth/drive.metadata.readonly [screenshot]
  14. Click the Update button
  15. Click the Save and continue button [screenshot]
  16. Click the Add users button
  17. Add the email of the user you will use with gdrive [screenshot]
  18. Click the Add button until the sidebar disappears
  19. Click the Save and continue button [screenshot]
  20. Click on the Credentials menu item again
  21. Click on the Create credentials button in the top bar and select OAuth client ID [screenshot]
  22. Select application type Desktop app and give a name [screenshot]
  23. Click on the Create button
  24. You should be presented with a Cliend Id and Client Secret [screenshot]. If you dont copy/download them now, you may find them again later.
  25. Click OK
  26. Click on OAuth consent screen menu item
  27. Click on Publish app (to prevent the token from expiring after 7 days) [screenshot]
  28. Click Confirm in the dialog

powered by https://github.com/glotlabs/gdrive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment