Skip to main content
POST
/
reactions
JavaScript
import Whopsdk from 'whopsdk';

const client = new Whopsdk({
  apiKey: 'My API Key',
});

const reaction = await client.reactions.create({ resource_id: 'resource_id' });

console.log(reaction.id);
{
  "id": "reac_xxxxxxxxxxxxxxxxxxxxxx",
  "resource_id": "<string>",
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "username": "<string>",
    "name": "<string>"
  },
  "emoji": "<string>"
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Body

application/json

Parameters for CreateReaction

resource_id
string
required

The ID of the post or message to react to.

emoji
string | null

The emoji to react with (e.g., :heart: or '😀'). It will be ignored in forums, as everything will be :heart:

Response

A successful response

Represents a reaction to a feed post

id
string
required

The unique identifier for the entity

Example:

"reac_xxxxxxxxxxxxxxxxxxxxxx"

resource_id
string
required

The ID of the post this reaction belongs to

user
object
required

The user who reacted to the post

emoji
string | null
required

The emoji that was used in shortcode format (:heart:)

I