Find your content:

Search form

You are here

how do you access chatter public links through apex/api?

 
Share

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:

https://cs10.salesforce.com/sfc/p/J00000006xkGRrSFndEnKTJ.makAJDKKerg9naQ=

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.


Attribution to: Greg Grinberg

Possible Suggestion/Solution #1

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

/services/data/v30.0/chatter/files/[fileId]/file-shares/link/

See the chatter rest api pdf for more details..


Attribution to: Abraxas

Possible Suggestion/Solution #2

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:

http://success.salesforce.com/ideaView?id=08730000000KaQoAAK


Attribution to: Bob Buzzard

Possible Suggestion/Solution #3

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


Attribution to: Fabien Taillon
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1625

My Block Status

My Block Content