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
victor_appiphonyvictor_appiphony 

Customer Community Users accessing Chatter REST API?

Hello,

 

I'm running into a roadblock when trying to login as a Customer Community User and access the Chatter REST API via our Connected App.

 

I'm able to get in and access the API no problem with a System Administrator user type. However for a Customer Community User, it looks like they give me access but I can't get any queries to return data.

 

I successfully OAuth and get an access token but when making the request I get the error:

"The Chatter Connect API is not enabled for this organization or user type."

 

I've created a Permission Set for the Customer Community User to have "API Enabled" and added that to the Connected App.

I've tried OAuth'ing via user-agent and web-server and for both, the tokens I get do not work. When using web-server, the code I get back does work to get the access token, but again the token is not valid.

 

Am I forgetting something in the header that is needed for non-Sys Admin users?

 

More info on my process:

Auth code url:

https://app-comm-test-developer-edition.na15.force.com/comm1/services/oauth2/authorize?response_type=code&client_id={our connected app's client id}&redirect_uri=https://login.app-comm-test-developer-edition.na15.force.com/services/oauth2/success

After login, with the code given back, I send a request to:

https://app-comm-test-developer-edition.na15.force.com/comm1/services/oauth2/token

This grants me an access token, which I then include in the header as {'Authorization' : 'OAuth <token>'} to:

https://app-comm-test-developer-edition.na15.force.com/comm1/services/data/v29.0/connect/communities/0DBi0000000CavRGAS/chatter/feeds/news/me/feed-items

 

This is where I get the error message: "The Chatter Connect API is not enabled for this organization or user type."

If I replace the access token with one given to me when logging in as a System Administrator, things work fine.

 

Any insight on steps I'm missing are greatly appreciated!

 

Cheers,

Victor

Best Answer chosen by Admin (Salesforce Developers) 
alouie_sfdcalouie_sfdc
I think you might have to clone the user's profile, and then edit the cloned one to set API Enabled. Can you give that a try?

All Answers

alouie_sfdcalouie_sfdc

Hi,

 

Can you please verify again that the Customer Community user's "API Enabled" profile permission is on, and that the user is a member of at least one active community?

victor_appiphonyvictor_appiphony
Hi Alouie,

Thanks for the reply. Yes, the customer is a member of the community I'm
trying to access.

In their user profile settings, API Enabled is unchecked so I thought
adding the Permission Set with API Enabled checked would override that. I
can't seem to get into an Edit mode to change that in the User Profile
settings. Is there a way? Thank you!!
alouie_sfdcalouie_sfdc
I think you might have to clone the user's profile, and then edit the cloned one to set API Enabled. Can you give that a try?
This was selected as the best answer
victor_appiphonyvictor_appiphony

That did it, thanks so much!!!

alouie_sfdcalouie_sfdc
Happy to help! Good luck with your implementation. Feel free to post on the board any time you're running into issues with the API, or if you have any feedback on it.