2

Is there any documentation that says what streaming channels are allowed for communities?

(Note that in communities lightning-emp-api methods such as isEmpEnabled never resolve but it is possible to directly load and use CometD JavaScript.)

I'd like to use a StreamingChannel because that includes user id filtering. But using Comet D JavaScript for a "Customer Community Login" licensed user the response is:

{
    "clientId":"1n01i4ijc3vw89e11fi7leljv7xr2",
    "channel":"/meta/subscribe",
    "id":"2",
    "subscription":"/u/CvcpProgress",
    "error":"403::No access on channel",
    "successful":false
}

which is documented to mean:

The generic streaming channel can’t be accessed because the user doesn’t have permissions on the StreamingChannel object.

That object is not present in the profile, and granting rights through a permission set is not allowed:

The user license doesn't allow the permission: Read Streaming Channels

Trying a Platform Event "/event/cvcp__ProgressEvent__c" the subscribe works:

{
    "clientId":"1njst1mjwlem9r8t7qy9p8l9409",
    "channel":"/meta/subscribe",
    "id":"2",
    "subscription":"/event/cvcp__ProgressEvent__e",
    "successful":true
}

and the published values are received, but there is no user id filtering for this case. But perhaps this is my only option?

2
  • For documentation you could look below - under experience section you’ll see that community is still not supported yet unfortunately- developer.salesforce.com/docs/component-library/bundle/…
    – sfdx bomb
    Commented Jan 30, 2021 at 12:27
  • Thanks; yes I've seen that documentation hence the direct use of JavaScript for the Comet D.
    – Keith C
    Commented Jan 30, 2021 at 12:37

2 Answers 2

0

look heroku node.js with streaming channels https://developer.salesforce.com/blogs/2021/08/how-to-work-within-platform-events-delivery-limits

2
  • 2
    Welcome to Salesforce SE! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – identigral
    Commented Sep 15, 2021 at 16:50
  • 1
    I second @identigral 's motion. Plus from the Why and how are some answers deleted? section of the Help Center: 'Answers that do not fundamentally answer the question may be removed. This includes answers that are: ... -barely more than a link to an external site'.
    – Moonpie
    Commented Sep 15, 2021 at 16:58
0

I suppose CometD version 3.1.0 or later is supported, as they are supported in the Streaming APIs. For more information please refer to this link. Please check if your user has access to the platform event object.

You must log in to answer this question.

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