I am trying to pull just one cell value from a google sheet using javascript and the google sheets API, and I am using the below code, but I keep getting the below error which I can't understand because I am using the spreadsheet id and range.
throw new Error('Missing required parameters: ' + missingParams.join(', ')); Error: Missing required parameters: spreadsheetId, range
const auth = new google.auth.GoogleAuth({
keyFile: "sheets-credentials.json",
scopes: "https://www.googleapis.com/auth/spreadsheets",
});
const client = await auth.getClient();
const googleSheets = google.sheets({ version: "v4", auth: client });
const spreadsheetId = "asheetid";
googleSheets.spreadsheets.values.get(spreadsheetId, `Sheet1!D1`)