2

I am pulling data from a spreadsheet via Google Sheets V4 REST API and Ruby:

https://sheets.googleapis.com/v4/spreadsheets/MASTER_SPREADSHEET_ID/values/A:GH?key=GOOGLE_SERVER_KEY

I had this working before, until the spreadsheet was removed and recreated. Now I am getting a 403 error with the new spreadsheet.

enter image description here

APIs:

enter image description here

The Docs state that you can just append the url with an API Key, am I interpreting this wrong?

enter image description here

AthleteInAction
  • 435
  • 4
  • 14

3 Answers3

2

I faced the same problem and solved it. The problem was the public scope of the Google sheet you were trying to access.

  1. Enter the spreadsheets you want to access.
  2. Click the Share button.
  3. Click View Link.

If you set the public view of the spreadsheets you want to access to the link view, all users who want to access the link will be able to access it.

eun
  • 21
  • 4
0

First, make sure you have a permission to call this spreadsheet. You can also try to change the status of this spreadsheet to public and checked if you can access it now. This 403 error is usually caused by incorrect or missed some configuration in Authorizing Requests. For more information, if you authorizing requests with OAuth 2.0, make sure you use proper scope with it.

KENdi
  • 7,576
  • 2
  • 16
  • 31
0

Following up on what KENdi said, you will also get a

The remote server returned an error: (403) Forbidden.

If the API for the service you need is not enabled.

Citroen
  • 11
  • 1