question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to add activity (client-side)

See original GitHub issue

Hi there,

I can’t add an activity from the client side.

According to https://getstream.io/docs/js/#adding-activities, I must pass a “userToken” to the feed constructor; but every time I get a 403.

Isn’t it the same token as the one generated with createUserToken ? Or have I to generate one for follow/unfollow and one for adding activities to the user feed ?

Thanks for your help

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JelteFcommented, Dec 11, 2018

@Djiit That code snippet definitely helped. To be sure that users cannot impersonate another user adding an activity is only allowed if the actor is a reference to the user that the token belongs to. In this case it’s the exact string instead of a reference, which would be SU:xY4mbWw3pwMlrrQO9NAI2e9t4yF2.

The easiest way to solve this is by simply not providing the actor field. When initializing the client with a userToken the default actor will be a reference to the user from the token.

I’m closing this as I’m very sure this would solve your issue. If not feel free to reopen it.

0reactions
99hatscommented, Dec 27, 2018

On v4.0.9 I get a 403 when leaving out actor. I did get it working by prepending “SU:” to the actor after finding this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Activate activity not working on the citrix clientside - Help
Dear community,. I have been developing a workflow with the framework on a development server on which I have poweruser rights.
Read more >
How to troubleshoot client-side problems when editing an issue
2. Temporarily disable Add-ons, running in safe mode, and check if the issue is still reproducible. · 3. Temporarily disable HTML in custom...
Read more >
"Add Client-Side Library" option is missing in Visual Studio ...
1 Answer. Save this answer. Show activity on this post. Make sure the Microsoft Library Manager extension is installed/enabled.
Read more >
Can't use sdk on client side · Issue #177 - GitHub
I can't use the SDK on client-side (React App) the documentation states "This SDK can be used for both server-side as well as...
Read more >
Use LibMan with ASP.NET Core in Visual Studio
Library files can be added to an ASP.NET Core project in two different ways: Use the Add Client-Side Library dialog; Manually configure LibMan ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found