Hi @Ben Gallienne ,
Download file Graph API allow us to download one file at a time from OneDrive/SharePoint Online and currently there is no Graph API availble to download multple selected files into zip file as we can do it in OneDrive/SharePoint Online UI. Even you will not be able to utilise above mentioned url to achive the same.
However as a workaround, you can be able to use JSON batching option to download up to 20 files from OneDrive/SharePoint Online with Graph API. JSON batching allows you to optimize your application by combining multiple requests (up to 20) into a single JSON object. Please find the couple of examples below on the same :
Example 1:
POST https://graph.microsoft.com/v1.0/$batch
{
"requests": [
{
"id": "1",
"method": "GET",
"url": "/me/drive/root:/test.docx:/content"
},
{
"id": "2",
"method": "GET",
"url": "/me/drive/root:/testPDF.pdf:/content"
},
{
"id": "3",
"method": "GET",
"url": "/me/drive/root:/testPPT.pptx:/content"
},
{
"id": "4",
"method": "GET",
"url": "/me/drive/root:/testExcel.xlsx:/content"
}
]
}
Example Output Screenshot from Graph Explorer :
Example 2:
POST https://graph.microsoft.com/v1.0/$batch
{
"requests": [
{
"id": "1",
"method": "GET",
"url": "/me/drives/b!wNpJe7WRRkC8Q5N2f-eDhDCULks5oblAhvAbCdsulXiHXcgsFNblR44xoX1r-ZkU/items/01H2CECZV4KXYRSVB3TZHIZGPQSBNNXP7Y/content"
},
{
"id": "2",
"method": "GET",
"url": "/me/drives/b!wNpJe7WRRkC8Q5N2f-eDhDCULks5oblEFGHbMcsulXiHXcgsFNblR44xoX1r-ZkU/items/01H2CECZWTHNXW3OYLLNDIWAFTEAAGWL4N/content"
},
{
"id": "3",
"method": "GET",
"url": "/me/drives/b!wNpJe7WRRkC8Q5N2f-eDhDCULks5ijkAhvRbMcsulXiHXcgsFNblR44xoX1r-ZkU/items/01H2CECZUNFJEYLB3Y4ZGZB36TCYVLHATU/content"
}
]
}
Example Output Screenshot from Graph Explorer :
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.