How to Download a File from Zoho WorkDrive Using a Public Link

How to Download a File from Zoho WorkDrive Using a Public Link

How to Download a File from Zoho WorkDrive Using a Public Link

If you're working with Zoho WorkDrive and want to download a file using a public link, here's a simple method to do so using API or a basic script. This approach helps developers or teams quickly fetch shared resources without logging in or authenticating each time.

In this example, you’ll just need the Zoho WorkDrive public file link ID, and you can use the following code snippet to trigger the download.

Make sure to replace the placeholder ID with your actual Zoho WorkDrive public file ID.


  1. header = Map();
  2. header.put("Accept","application/vnd.api+json");
  3. data = Map();
  4. data_param1 = Map();
  5. att_param1 = Map();
  6. att_param1.put("resource_id","7dxim0d37f62283e042b8951bbfe3eae84d74");
  7. att_param1.put("link_name","report2021");
  8. att_param1.put("link_type","download");
  9. att_param1.put("request_user_data","false");
  10. att_param1.put("allow_download","true");
  11. innerattr_param_map1 = Map();
  12. data_param1.put("attributes",att_param1);
  13. data_param1.put("type","links");
  14. data.put("data",data_param1);
  15. response = invokeurl
  16. [
  17.   url :"https://www.zohoapis.com/workdrive/api/v1/links"
  18.   type :POST
  19.   parameters:data.toString()
  20.   headers:header
  21.   connection:"zohoworkdrive"
  22. ];
  23. download_url = response.get("data").getJSON("attributes").getJSON("download_url");
  24. download_url = download_url + "?directDownload=true";
  25. openUrl(download_url,"new window");

Replace 7dxim0d37f62283e042b8951bbfe3eae84d74 with your Zoho WorkDrive ID.
    • Sticky Posts

    • Ask the Experts: Five-hour live Q&A session with Zoho WorkDrive product experts

      Have questions about WorkDrive 5.0? Let’s talk! We recently launched Zoho WorkDrive 5.0, packed with powerful updates to help your team work smarter, stay secure, and get more value from your business content. From content-centric workflows and AI-powered
    • Support for auto-upgrade in TrueSync (for Windows)

      WorkDrive TrueSync app now supports auto-upgrading to the latest version for Windows OS. You must manually download and install the TrueSync app version 3.4.0 to avail this feature. Download the latest TrueSync app for Windows (version 3.4.0) Supported
    • WorkDrive API Documentation

      WorkDrive provides users and developers an extensive set of APIs to help integrate functionalities of Zoho WorkDrive with other Zoho applications and third-party tools. We have published the official WorkDrive API Documentation page for all external users.
    • March 15, 2023: Zoho Docs is discontinued

      As of today (March 15, 2023) Zoho Docs is discontinued for all users. We would like to thank our customers for trusting us for so many years! Going forward, we're confident you'll enjoy using Zoho WorkDrive for all your advanced file management and collaboration
    • Introducing WorkDrive 4.0: Enhanced productivity. Advanced data administration. (Phase 1)

      Hello All, We're excited to share the release of WorkDrive 4.0, which includes important new features and enhancements focused primarily on productivity, secure collaboration, data administration, integrations, and user experience. Read the official announcement