What is the API call to create external sharelink for a pdf
Here's my code
- mp = Map();
- mp.put("Accept","application/vnd.api+json");
- // Parameters Map
- externalLinkMap = Map();
- externalLinkMap.put("resource_id",resource_id);
- externalLinkMap.put("link_name","link");
- externalLinkMap.put("request_user_data",false);
- externalLinkMap.put("allow_download",true);
- // Give view-only access
- externalLinkMap.put("role_id","34");
- attributesMap = {"attributes":externalLinkMap,"type":"links"};
- dataMap = Map();
- dataMap.put("data",attributesMap);
- // Create external share link
- external_link_data = invokeurl
- [
- url :"https://www.zohoapis.com/workdrive/api/v1/links"
- type :POST
- parameters:dataMap.toString()
- headers:mp
- connection:"workdrive_all"
- ];
The connection has the correct scope(s).
The error message is
- {"errors":[{"id":"R008","title":"Unauthorized access"}]}
I know the code works for native Zoho document types such as a sheet.
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.