How to get google spreadsheet content?

Hello. I’m trying to load and parse Google drive spreadsheet with “anyone who has link” access level, but however I cannot load file content as JSON, I’ve got a 403 error:

fileGetCall := getService().Files.Get("10b5vwZmztTYloEejmG-bq9NaIXwRqPEl-8J_7UHOoHs")
downloadedFile, err := fileGetCall.Do(googleapi.UserIP(GetLocalIP())) //ok
if err != nil {
	panic(err)
}
fmt.Println(downloadedFile.Name)
fileConvertCall := getService().Files.Export("10b5vwZmztTYloEejmG-bq9NaIXwRqPEl-8J_7UHOoHs", "application/json")
err = fileConvertCall.Do(googleapi.UserIP(GetLocalIP())) //error 403 Insufficient Permission
if err != nil {
	panic(err)
}

Or there are another way to read google spreadsheet file content? I was trying to find it, but it seems to now I can not read google spreadsheet with Go. Full listing

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.