Get shared link through Google Drive API

后端 未结 4 819
庸人自扰
庸人自扰 2020-11-30 06:14

I am working on an app using Google Drive. I want the user to be able to share files by link, setting the permissions to anyone and withLink as des

4条回答
  •  星月不相逢
    2020-11-30 06:32

    In my case using the PHP Api v3, for the link to be non-empty you must define that you request this field... and if you have the right permissions:

    so something like this:

    $file =self::$service->files->get("1ogXyGxcJdMXt7nJddTpVqwd6_G8Hd5sUfq4b4cxvotest",array("fields"=>"webViewLink"));
    

提交回复
热议问题