0

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.

Headers & Error: enter image description here

Body: enter image description here

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:

  • 1
    To create the link, i think you dont need the If-Match and X-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
  • @GautamSheth - Yea, I tried that as well with the same results. Sorry, I should have updated the screenshot. And I have tried with/without the additional headers. They were just some troubleshooting attempts. – Tracy Dec 31 '18 at 14:22
1

Here is my test steps with use user context to test the rest api in postman, you could refer this thread to get user context.

enter image description here

enter image description here

  • Thank you for providing a screenshot example! I guess my confusion is why you need to include the user context at all (X-RequestDigest). According to Vesa's article, these Rest URL's should be available using the bearer token. Unless I am misunderstanding his guidance. blogs.msdn.microsoft.com/vesku/2015/10/02/… (Scroll down to the bottom and look at the first FAQ). I am building a B2B proxy web API, so I won't have any user context. – Tracy Dec 31 '18 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.