0

I am using Visual Basic to receive data from a Google sheet column using a key created in Credentials. Initially it works fine with the first sheet ID I used but I keep on getting "permission denied" if I use other ID's. Does anybody have a hint of what could cause the error?

The code creating the string used for calling the sheet looks like this

Dim sheetURL As String = "https://sheets.googleapis.com/v4/spreadsheets/" & GoogleID & "/values/" & SheetID & "!" & ColumnID & ":" & ColumnID & "?key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83

2 Answers2

0

Based on your issue, you can try to refer to this link for some possible fixes on your case: "PERMISSION_DENIED" on Google Spreadsheet REST API v4

Monique G.
  • 239
  • 1
  • 6
0

Case solved as it was related to Sharing properties of the individual sheets. A public link will not work with VB even though it is readable in a browser unless sharing properties are set to "Anyone on the Internet with this link can edit"