+ Start a Discussion

Downloading Chatter Files.

So I've been going around and around about this for a while now and nothing in the documentation seems to be accurate.  Hopefully I will supply enough detail that this matter can be solved.  I need to be able to retrieve any file that a user posts to chatter regardless of the size of the file.


I have a file which I posted to chatter via the web.


When I look at the page it is listed under Chatter>>Files>>(FileName)


When I query for the file it only appears in Commencement


















*The object above looks nothing like the ContentDocument Model provided here:



So, I have an OAuth token authorizing my Remote Access App. I'm using the REST API.  How do I download the file?  What I'm really trying to avoid here is screen scraping or other halfass methods like storing my clients' username and password.


I was following this tutoiral:


but it obviously doesn't work, because it uses the "Document" sObject and the file I have doesn't appear there:

[{"message":"The requested resource does not exist","errorCode":"NOT_FOUND"}]



What I am hoping for:

Some call that will return a https://direct/link/to/the/file/i/want/to/download.jpg where I can pass "Authorization OAuth: <access_token>" in the headers and download the actual file.


What I will settle for:

Any programmatic way of retrieving the file that does not involve the customer having to divulge their username and password to me in order screen scrape SF to login and get to the file.



Hi, have you tried using the /chatter/files/fileId/content endpoint of the Chatter REST API?


The documentation is at http://www.salesforce.com/us/developer/docs/chatterapi/Content/connect_resources_files.htm


Are you able to download using /chatter/files/fileId/content endpoint.Please help

Vikas Malhotra.ax1630Vikas Malhotra.ax1630

Hi I am also trying to create a download link using the fileId/Content url. However it is sending the complete content instead of the download link which can be used to set in the anchor tag. Please let me know your inputs how to proceed further.