TwurpleAuthenticationGetting dataExamplesFAQMigration

Main classes

HelixWhisperApi

The API methods that deal with whispers.

Overview

Methods

Can be accessed using 'client.whispers' on an ApiClient instance

Example

const api = new ApiClient({ authProvider });
await api.whispers.sendWhisper('61369223', '86753099', 'Howdy, partner!');

Methods

sendWhisper(from, to, message)

async

Sends a whisper message to the specified user.

NOTE: The API may silently drop whispers that it suspects of violating Twitch policies. (The API does not indicate that it dropped the whisper; it returns a 204 status code as if it succeeded).

ParameterTypeRequiredDefaultDescription
from
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The user sending the whisper. This user must have a verified phone number and must match the user in the access token.

to
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The user to receive the whisper.

messagestringnone

The whisper message to send. The message must not be empty.

The maximum message lengths are:

500 characters if the user you're sending the message to hasn't whispered you before. 10,000 characters if the user you're sending the message to has whispered you before.

Messages that exceed the maximum length are truncated.

Return type: void