import { PeriskopeApi } from '@periskope/periskope-client';

const client = new PeriskopeApi({
  authToken: 'YOUR_API_KEY',
  phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});

async function reactToMessage() {
  const response = await client.message.react({
    message_id: 'true_919487126251@c.us_3EB0F754E67BDF3178E76C680224FF7114E2CB95',
    reaction: '👍'
  });

  console.log(response);
}

reactToMessage();
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-phone
string

Please provide the number of the phone you want to call with this API in the header. The number must be in country code + number format without any characters or spaces, e.g. 919876543210; Alternatively, provide the phone_id (phone-xxxxxxxxxxxx) in the header

Example:

"{{orgPhone}}"

Path Parameters

message_id
string
required

The message_id or the queue_id of the message to react to

Example:

"true_919537851844@c.us_3EB0C62861626B2D8BD4A386E48976EC85CB009C"

Body

application/json
reaction
string
required

The emoji to be added to the message

Example:

"😄"

Response

204
application/json
204

204 No Content