function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mms.testsmms.tests 

INSUFFICIENT_ACCESS when I tried to access a user's news feed I followed

I logged into chatter app using my credential. When I tried to open another user's feeds using following REST API

 

/services/data/v28.0/chatter/feeds/news/005i0000001lc4X/feed-items

 

where  005i0000001lc4X is that user's Id, I got error message saying:

 

HTTP/1.1 403 Forbidden Date: Wed, 20 Nov 2013 07:31:38 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked
[ { "message" : "You do not have permission to execute that operation.", "errorCode" : "INSUFFICIENT_ACCESS" } ]

 

Any idea why? Because I am following this user, I should be able to view his news feeds, right?

 

Thanks in advance!

 

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
alouie_sfdcalouie_sfdc

Only a user can view his or her own news feed. What you probably want to request is the user profile feed. Instead of the "news" feed, use the "user-profile" feed, as in:

 

GET /services/data/v28.0/chatter/feeds/user-profile/005i0000001lc4X/feed-items

 

All Answers

alouie_sfdcalouie_sfdc

Only a user can view his or her own news feed. What you probably want to request is the user profile feed. Instead of the "news" feed, use the "user-profile" feed, as in:

 

GET /services/data/v28.0/chatter/feeds/user-profile/005i0000001lc4X/feed-items

 

This was selected as the best answer
mms.testsmms.tests

Thanks! it works. I have another follow up question: how to get all feeds for a group?

 

I tried following url (0F9i00000000MLq as groupId), but it does not work.

/services/data/v28.0/chatter/groups/0F9i00000000MLq/feed-items

 

Error messaage is:

HTTP/1.1 404 Not Found Date: Wed, 20 Nov 2013 10:06:53 GMT Sforce-Limit-Info: api-usage=978/5000 Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked
[ { "message" : "The requested resource does not exist", "errorCode" : "NOT_FOUND" } ]

 

Thanks!

 

 

 

alouie_sfdcalouie_sfdc

For that, you need to use "record" in the URL instead of "groups".

 

This "How do I..." page in the API documentation is quite useful for common operations:

 

http://www.salesforce.com/us/developer/docs/chatterapi/Content/connect_resources_how_to.htm#cc_get_group_feed

jody_blyjody_bly
You may also want to check out the "Working with Feeds and Feed Items" doc.
http://www.salesforce.com/us/developer/docs/chatterapi/Content/intro_feeds_feed_items.htm