Thank you for reply
I wanted to know if Token was written in the correct format
If run in a backend file
Frontpage code,
import getDriveFolder from 'backend/googledrives';
const query = 'mimeType = "image/png" or mimeType = "image/jpeg"';
const fields = 'files(name, webViewLink)';
getDriveFolder(query , fields);
In ‘backend/googledrives’,
import { listFiles } from '@velo/google-drive-integration-backend'
export async function getDriveFolder(query , fields) {
listFiles(query, fields).then((data) => {
if (data.files.length > 0) {
const image = data.files[0];
const name = image.name;
const viewLink = image.webViewLink;
}
})
.catch((error) => {
console.log(error);
});
}
