Closed ppreshant closed 4 years ago
made a file called enable_api.r in branch issue26. To use: Restart R studio to clear your old token. Paste in keys (can't upload these to github because security) Source enable_api.r. Run a command to read a sheet, it should ask you to log in to an app called CovidWW.
Works great now!
It should be good for right now, but is there anyway this authentication can be done only once and then stored, just like it stores the google account pre-authorized?
In case someone else in our group (Camille knows R) wants to use this, what would be the best practice for this API authentication? Since we can't paste the keys here, it looks like everyone should have this enable_api.r file in their local computer with the keys pasted with the file not tracked in the git, or somehow it should not be pushed to remote.
Is there any other way we can apply this?
The API keys should only really be used for heavy use cases. For typical weekly processing, not running enable_api.r will allow you to use your own personal login as usual.
That makes sense. Thank you for the clarification
On Tue, Sep 22, 2020, 10:37 AM David Zong notifications@github.com wrote:
The API keys should only really be used for heavy use cases. For typical weekly processing, not running enable_api.r will allow you to use your own personal login as usual.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ppreshant/WW-CoV2-project/issues/26#issuecomment-696801310, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRLCH7O3YTS7QNDSKZCTFDSHDACXANCNFSM4RSH5X7A .
I occassionally get this error message when doing
read_sheet()
over multiple google sheets in a short duration of time.Full error message
This can be solved by creating a google cloud platform project and getting service account (or an API key) to run with the google sheets API through the R package. Here is a great reference linked to a document with all the necessary details.
Can you figure out how to set this up @DavidZong ?