whispers - YoYoGames/GMEXT-Twitch GitHub Wiki

Whispers

Functions

These are the functions of this module:



Back To Top

twitch_whispers_send_whisper

Twitch Endpoint: Send Whisper

This function sends a whisper message to the specified user.

Note

The user sending the whisper must have a verified phone number (see the Phone Number setting in your Security and Privacy settings).

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.)

Rate Limits: You may whisper to a maximum of 40 unique recipients per day. Within the per day limit, you may whisper a maximum of 3 whispers per second and a maximum of 100 whispers per minute.

Note

Requires a user access token that includes the TWITCH_SCOPE: TWITCH_SCOPE_USER_MANAGE_WHISPERS.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Success Callback, or Failure Callback.


Syntax:

twitch_whispers_send_whisper(from_user_id, to_user_id, message, callback_success, callback_failed)
Argument Type Description
from_user_id String The ID of the user sending the whisper. This user must have a verified phone number. This ID must match the user ID in the user access token.
to_user_id String The ID of the user to receive the whisper.
message String 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.
callback_success Function Triggered if the request succeeded
callback_failed Function Triggered if the request failed



Returns:

N/A


Triggers:

Success Callback

This method is triggered on success. It has no response body.


Failure Callback

This method is triggered on failure.



⚠️ **GitHub.com Fallback** ⚠️