Create a folder using the Google Drive API
By Mike Sallese ·
Create folder via REST API in vanilla javascript
let createFolderOptions = {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
mimeType: "application/vnd.google-apps.folder",
name: "My new google drive folder!",
}),
};
const response = await fetch("https://www.googleapis.com/drive/v3/files", createFolderOptions);
const json = await response.json();
For other Google Drive API Examples: https://www.mikesallese.me/tags/google-drive-api-examples
About the author
Mike Sallese. I build Scribbl, an AI note taker with no bot in the call, and a few other pieces of software. Off the computer I am building a straw bale workshop.
X · Medium · GitHub · articles on other sites