According to this, this, and this resource, one can call the Web.CreateAnonynousLink via the Rest API (in addition to CSOM). I am trying to get a working example going in Postman, but not having any luck.
I can successfully access the search API in another Postman tab for the same tenant, using the same Bearer token.
A few people who are having similar issues:
If-Match
andX-Http-Method
parameters in the headers. Also, can you try with{'url': 'https://tenant/sites/pub2/Appointment Forms/Appointment form example.docx', 'isEditLink': true}
as payload, do replace with your actual values though :) ? – Gautam Sheth Dec 29 '18 at 5:53