Unable to add activity (client-side)
See original GitHub issueHi 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:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.
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.