3

I'm working with the js/node api of getstream and I'm trying to add a realtime feature to the comments on the activities, but I'm receiving a 403 error, displaying I dont have permission.

I've tried using targetFeeds: '[timeline:userid]' but it wrecks the application.

Also I tried to use the notification feed as in the documents is being used, and I can set targetFeeds like this: '[notification:userid]' which obviously is not the desired thing to do because this will cause that every message on different activities of this user will be shown on the callback.

client.reactions.add("comment", activityId, {
      "text": newComment,
      "profileImage": 'https://i.pravatar.cc/300',
      "timestamp": date,
      "from": userId,
      "id": foreignId,
    },
    {targetFeeds: [`CommentsFeed:${activityId}`]});

And the response of the 403 is the next one:

{
  code: 17
  detail: "You don't have permission to do this"
  duration: "0.18ms"
  exception: "NotAllowedException"
  status_code: 403
}

The expected result is not having the 403, that will trigger the callback I implemented.

M_Armendariz
  • 150
  • 9

1 Answers1

1

The default permission settings allow users to only write activities to their own feeds; in this case you are adding an activity to CommentsFeed:${activityId}.

You can request support (support@getstream.io) to whitelist this for you app(s). Just make sure to mention this case and include your applications.

Tommaso Barbugli
  • 11,781
  • 2
  • 42
  • 41