-1

I'm completely newbie on google api and I'm trying to read the data from my private google-sheet using google-sheet-api in my own site/localhost.

It is simpler if google-sheet is set public and be viewed by anyone, you can directly use the api and the key, but if not, I'm not sure what step should I take? What is the better way to do this.

TeeFayb
  • 1
  • 2
  • 2
    Possible duplicate of [How to get access to a private spreadsheet from the API?](https://stackoverflow.com/questions/39747381/how-to-get-access-to-a-private-spreadsheet-from-the-api) – Alexandre Elshobokshy Jan 15 '19 at 09:14

2 Answers2

0

In the old days, you would embed your username and password in your app. That way your app can authenticate itself to Google and it will be allowed to access your spreadsheet.

That is no longer possible, so the modern equivalent is ...

The Google spreadsheet API requires an Access Token. In order to get that AT, your app needs to have an embedded Refresh Token which you can think of as being the modern equivalent of a username/password.

Full details are in How do I authorise an app (web or installed) without user intervention?

pinoyyid
  • 21,499
  • 14
  • 64
  • 115
-1

You can use OAuth token to authorize as yourself in the API as explained here and simply access your sheets, public or private, by standard API methods, which you can find here.

Mikhail Litvinov
  • 452
  • 2
  • 10