Hello, our team is having issues reacting to comment-type posts.
- First, we our attempting to use the CommentTray component as the frontend component: Comment Tray Component | social.plus docs (since renamed the AmityStoryTabComponent).
- Posting a comment is successful:
- We POST to
/api/v3/comments - Request:
-
{"referenceId":"wlc-2026-01-19","referenceType":"content","data":{"text":"Here is another comment."},"mentionees":[],"metadata":{"mentioned":[]}} - In the response object, the
commentdoes have"referenceType": "content",, and the id/commentId is set to :
"_id": "696fc0d80b1a94a57661c65b", "commentId": "696fc0d80b1a94a57661c65b",
-
- Reacting to the comment is NOT successful:
- POST
/api/v2/reactions - Request:
-
{"referenceId":"696fc0d80b1a94a57661c65b","referenceType":"comment","reactionName":"like"} - Note the
referenceIdabove matches the id of the posted comment
-
- Response:
-
{ "status": "error", "message": "reaction validation failed: targetId: Cast to ObjectId failed for value \"wlc-2026-01-19\" (type string) at path \"targetId\" because of \"BSONError\", targetType: `content` is not a valid enum value for path `targetType`.", "code": 500000, "data": { "detail": [] } }
-
- According to the API documentation, this is the correct structure for the request object to that endpoint: Social+ API Reference
- NOTE: These API requests are constructed by the UIKit, we are not building it directly
- POST
- We POST to
Overall, it looks like the API is NOT accepting reactions on posts that have a referenceType of comment - but there is no obvious reason why that is the case.