2

I'm creating a open source Java client application and I don't want to get data from a public read, only google sheet.

The users don't have to verify/login so I was wondering if there would be a way without any authentication at all.

If this isn't possible it would help a lot if someone could explain how I can create read only credentials for this one sheet.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • please provide a more detailed description of your issues, have you tried anything from your side if yes then kindly attach that in question, this link will help you a lot https://stackoverflow.com/help/how-to-ask. – Anurag Sharma Mar 04 '21 at 09:53
  • @AnuragSharma i think the issue is how release an open source project without including Google Credentials. As they are not allowed to be stored in open source projects. – Linda Lawton - DaImTo Mar 04 '21 at 09:55

1 Answers1

2

In order to use Google APIs you need to identify your application to Google in all calls. This is because they need to know which application is using their api in order to avoid spamming or overloading of the server. In the event of private user data this is done by the credentials created when the user signed in. However with public data you can use an APK key this will only allow you read only access. You won't be able to write to anything unless you are authorised using Oauth, so as long as you are reading this sheet and only reading then you should be fine using an API Key.

However due to the fact that your project is open source you will not be allowed to include this API key in your project as its against Google's TOS. You will need to instruct your users on how to create their own API key. Can i really not include an API key in my open sorce project. which they can then use with your project.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • If I would use Github secrets and only use the key in compiled versions it'd still be against Google's TOS because you can still find the key, right? –  Mar 04 '21 at 11:57
  • If anyone could access the key then yes you would be against googles tos. You and your developers are the only ones who should have access to your key. You need to understand that the key is connected to your developer account if someone starts spamming the system you will be shut down as they will think its you even though someone just downloaded your open source project. – Linda Lawton - DaImTo Mar 04 '21 at 12:44