1

I am working on a data Migration tool. I have add a functionality wherein a user can pull data from Google sheets.

The current approach that i have followed is by first generating credentials.json file from console.developers.google.com and used gspread library. So, whenever a user will have to pull data from google sheets , first he/she has to obtain the file, enable the drive api and share the file to be pulled with the client_email generated. But this seems very cumbersome for someone with limited technical knowledge.

What is the simplest way to do this?

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
ankit
  • 1,499
  • 5
  • 29
  • 46
  • What exactly do you find cumbersome? If you want to use the api you need to create a client on google developer console. If you want to access a file you need to have permissions to the file. – Linda Lawton - DaImTo Sep 21 '18 at 10:04
  • It's not cumbersome for me...but for end users who want to use my tool to fetch file from their google drive directly. They will have to follow all the steps and provide the contents of the credentials file as an input to my tool – ankit Sep 21 '18 at 10:11

1 Answers1

1

This is how it works. In order to access a Google API you need to create a project on Google developer console. If someone wants to run your python script they will have to create a project on Google developer console there is no way around that. And your application will need to be set up with permissions and the email access as you defined.

You can not share your credentials file with other users. See Can I really not ship open source with Client ID?

Asking developers to make reasonable efforts to keep their private keys private and not embed them in open source projects.

There is no API to help you help them automate the client creation either.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449