I am trying to inserting Feed-Item with Attachment in Production and in Sandbox separately for community users.

Community is active and my customer profile is added to the community. I know that I have to the put Image File into Content and get the Content-Version Id. I can use the Content Version Id to reference in RelatedToID and this inserts a record with attachment in Community.

I can do this successfully as a System Admin in Sandbox but it is failing in Production with the error.

"You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary."

Possible Issue which I could be is: The File is not getting shared with the Community User. The only different thing which I find is File is Shared in Sandbox and in Production it is not.But, this sharing happened automatically in production.

Can Community/Feed-Item expert help me out in this?

Thanks Gautam

1 Answer 1


The problem seems to be as you state: the user trying to create the feed item doesn't have access to the file. You mention it is not shared in Production. For a given file, you can go to the detail page for the file and see who it is shared with. It sounds like you want it to be shared with the entire community.

A file is shared with the community if it is shared (such as posted in the feed) of a public group in the community, or on a user's wall in the community.

Also, the file must be uploaded within the community to be shared in the community (not uploaded in the internal org).

These requirements are the same for sandbox and production, so I can't tell what was different in your two situations.

Could you please describe how the file was created for both the sandbox and production org? Was it done through the API? If so, by inserting a content version or by inserting a feed item. If a feed item, what entity was it created on? If it was the Connect API, what endpoint?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .