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?
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.