-
Notifications
You must be signed in to change notification settings - Fork 444
Tabletop becoming obsolete :-( #187
Comments
There are a lot of sheet ---> JSON projects around, are they all going to break? That's why I'm wondering exactly what Google is doing that is causing breakage. |
Any idea about when it will become obsolete ? |
I believe they'll start turning off the V3 API in May, and then by September it all shuts down? Not sure where I read it, but that's what I remember offhand. The issue is that the new version of their API requires you to use OAuth to log in to do pretty much anything, so we're kinda stuck with something that works from the "publish as CSV" angle. I haven't played around with it too much other than getting the Papa Parse example up and running, so if anyone has other ideas or approaches I'm all ears and happy to update the README and examples. |
Here are the details: https://cloud.google.com/blog/products/g-suite/migrate-your-apps-use-latest-sheets-api |
A note that Papa Parse is not limited to one sheet, either using the current README solution, or the solution that I offered at #189 (comment) that fixes the CORS issue. In the latter solution you specify the worksheet name, as before. In the former solution (which seemed to break early this week--for at least two of us) you add I don't know if the solution I offer is going to cost money. The Google Sheet API v4 does impose limits. (Time will tell, I guess. I couldn't actually figure out how to calculate what I'll be charged. My guess is: not much.) |
I think that it's important to note that while @mroswell has a nice and elegant solution in #189 (comment) (I'm not even sure it requires Papa Parse since it returns a simple well-formed JSON object), this is probably not a good idea for public facing projects. Or at least it's something that people should consider carefully before choosing to implement. The purpose of an API key is that it is a key that you hold and keep protected, just like the key to your house or your car. Ideally it should be hidden behind a backend that proxies requests between your client and whatever service you're ingesting so that you have some level of control over who is using it. If you put it in your client facing code, anyone can see it and use it for their own purposes. I've already verified this by searching for repos that use this method posted above, pulling the key, and using it to download my own spreadsheets. If you do decide to proceed, know that Google does not allow you to cap billing. This is by design. The best you can do is set up alerts when you reach a threshold. Be prepared to react quickly if you get a billing notification. Also, don't commit code that has the API key in it. And if you can, set a referer on any keys you make. None of those things can stop bad people from stealing your keys, but they might slow down the damage a little when it does happen. |
Oh heck! This API key security issue comes very close to being a killer for my project. |
Yes and no. Forcing a trusted domain will stop folks from stealing your key and also using it client side. This is of course better than nothing. It can't stop folks from using it server side and spoofing the referer header. I'm not saying that the client side solution using the key should be taken off the table, just that I think there needs to be a big disclaimer in bold faced print somewhere so people understand the implications of doing it this way. I'm a big fan Tabletop and have been using it for ~10 years now. I plan on using this api key client side for private applications and in build steps where exposing the key has no real consequence. For public facing apps I'm not sure what I'll be doing yet but likely some form of server side code that hides the key and caches the response to an S3 bucket or something.
All I'm saying is that you don't need Papa Parse or jQuery or any other library for this. It's just an array of arrays in the response. So if you pull the raw data like this
If you want something besides a simple key:value pair with the key being the header value, you can modify that loop however you want. But the point is it's so much faster/simpler and doesn't require any external libraries. |
Doesn't work. Message from slack: ``` Ran into some issues when trying to make something that can pull from Sheets. I found the community connect code (https://github.com/codeforboston/communityconnect/blob/03be07b972b28d615f7e955ac487b6ae896d177e/src/api/directoryGoogleSheets.js) that does what we want, but quickly found that this method (Tabletop js) just doesn't work anymore (https://github.com/jsoma/tabletop#but-wait-dont-use-tabletop). You can try some other methods, but they have some pretty serious drawbacks, like publishing your google API key (jsoma/tabletop#187 (comment)). ```
The migration deadline was pushed back to January 26, 2021. https://cloud.google.com/blog/products/g-suite/migrate-your-apps-use-latest-sheets-api |
So what exactly is Google doing to make Tabletop obsolete? Is there really no hope that it can be revived after the changes?
I've played with Papa Parse, but it is limited to one sheet. I love that Tabletop can pull multiple sheets into one JSON object.
Thank you,
Nate
The text was updated successfully, but these errors were encountered: