I'm trying to create a script that automatically creates files in a specific folder in my google drive account, but I got this error and i cant auth I'm using google service account instead of 0Auth
error:25066067:DSO support routines:dlfcn_load:could
this is my code
async function createFile({ folderId, title, data }) {
const auth = new google.auth.GoogleAuth({
keyFile: "credentials.json",
scopes: "https://www.googleapis.com/auth/drive",
});
const drive = google.drive({ version: "v3", auth });
// TODO(developer): set folder Id
// folderId = '1lWo8HghUBd-3mN4s98ArNFMdqmhqCXH7';
// This is a simple sample script for retrieving the file list.
drive.files.list(
{
pageSize: 10,
fields: "nextPageToken, files(id, name)",
},
(err, res) => {
if (err) return console.log("The API returned an error: " + err);
const files = res.data.files;
console.log(files);
}
);
}
I don't know what I did wrong, I try to search but I didn't find anything