Google Drive API会为任何文件创建临时下载链接

For any given file in a google drive account, I want to be able to generate a temporary universal download link. This download link should only last a certain amount of time, and anyone with the link should be able to download the file. I've tried getWebContentLink() and getDownloadUrl() but both don't allow just anybody to download the file. I was hoping for a function similar to dropbox where you could just generate a temporary link for any file.

Any suggestions? I am using the php google drive api

$downloadUrl = $file->getWebContentLink();
$downloadUrl = $file->getDownloadUrl();