HTTP 400 BAD REQUEST (Error)

hi i have this problem trying to connet my google sheet to roblox :frowning:

local documentID = "11quUIzrLOQLWdDIzoIz4trsxwKUFKQnWgueXHKaHGIQ"
local url = "https://docs.google.com/spreadsheets/d/11quUIzrLOQLWdDIzoIz4trsxwKUFKQnWgueXHKaHGIQ/edit#gid=0"
local page = "351828127"
local sheetName = "CARS"
local apiKey = --i put the last string of the json string that i downloaded when configuring autho2.0

local urlTrasnform = string.format("https://sheets.googleapis.com/v4/spreadsheets/%s/values/%s?key=%s",documentID,sheetName,apiKey)
local http = game:GetService("HttpService")

local response = http:GetAsync(urlTrasnform) --ERROR
local data = http:JSONDecode(response)
if data.values then
	for _, row in ipairs(data.values) do
		for _, cell in ipairs(row) do
			print(cell)
		end
	end
end
1 Like

Hi! :wave:
Try to print response variable to check if there’s any information about the error.

i solved the error myself :slight_smile: but thanks anyway :slight_smile:

1 Like

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