On a chatter file you have the option to share it with a public link by going to file sharing settings -> share via link. You get a link of the form:


Is there a way to create these links via apex/api and then query for the link URL?

My use case is creating these links for 4-5 chatter files (that are not all related to the same record) and sending out an email with them.

  • Have you looked at Chatter Connect? This page (look at FileSummary option) might give you the link you want salesforce.com/us/developer/docs/chatterapi/…
    – pbattisson
    Sep 25 '12 at 17:57
  • Assuming that the "DownloadURL" there is the same url as in the chatter REST api I don't think this is exactly what I need. That url is of the form '/services/data/chatter/files...' which is different from the public sharing link that SF gives you. Sep 25 '12 at 18:13

Since Winter 15 it's even easier, you can use Content Distribution : https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_contentdistribution.htm


As sharing chatter files via the link is based on content deliveries, I suspect you can't do this. I spent some considerable time investigating the creation of content deliveries programmatically and was unable to find an API to access.

There's an idea for this at:



It is now possible to get the share url through the chatter rest api:


See the chatter rest api pdf for more details..

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.